Lets say i have github action with the following steps
- name: create file run: echo content > file.txt shell: bash - name: Build the docker image run: | docker build . --file Dockerfile shell: bash
The content of docker file is:
COPY ./file.txt ./
I get an error:
COPY failed: stat /var/lib/docker/tmp/docker-builder611432326/file. txt: no such file or directory
After some debugging, i believe that the docker build see only files that came with the repository, and not generated in the action.
Is it a known limitation?
Is there a workaround for that?