I want to create a docker image. This is my work directory: Dockerfile.in test.json test.py
And this is my Dockerfile:
COPY ./test.json /home/test.json COPY ./test.py /home/test.py RUN python test.py When i launch this command: docker build -f Dockerfile.in -t 637268723/test:1.0 .
It gives me this error:
`Step 1/5 : COPY ./test.json /home/test.json ---> Using cache ---> 6774cd225d60 Step 2/5 : COPY ./test.py /home/test.py COPY failed: stat /var/lib/docker/tmp/docker-builder428014112/test.py: no such file or directory` Can anyone help me?
COPYstatement on my Dockerfile, and had the same issues. TriedCOPY /host_file /container_folder(without dot), and it worked. After this, tried the formerCOPYthat you have here, and it worked normally (wtf?)! One thing that I made different, was to remove all images (cache) that Docker generates on the build process. My guess, is that trash might be still stored on these intermediary images (I'm using Docker 18.09.5). Take a look on SO or GitHub, SO MANY issues about 'copying host -> container. Bad omen.