COPY failed stat var lib docker tmp docker-builder root page no such file or directory

+2 votes

Hi Guys,

I am trying to use the COPY command in my Dockerfile. But it is showing me the below error.

Step 7/9 : COPY /root/page/ /var/www/html/
COPY failed: stat /var/lib/docker/tmp/docker-builder506410735/root/page: no such file or directory

How can I solve this error?

Jun 4, 2020 in Docker by akhtar
• 38,210 points
18,315 views

2 answers to this question.

0 votes

Hi@akhtar,

To copy files from the base system to the docker container, you have to make sure that all the files are present where your Dockerfile is. It means Dockerfile and along with all the files or folders that you want to copy should be present in the same folder.

answered Jun 4, 2020 by MD
• 95,300 points
0 votes
I have faced the same error in Node. I was resolve using

COPY . .
answered Dec 3, 2020 by Tabish Ali
Hi@Tabish,

Can you share your complete script? It will help others, as well.

Related Questions In Docker

0 votes
1 answer
+2 votes
6 answers

copy directories in docker container excluding any one directory

One of the way could be copy ...READ MORE

answered Dec 10, 2018 in Docker by Prateek
19,699 views
0 votes
2 answers

How can I inspect the file system of a failed `docker build

Failed command is a build that has ...READ MORE

answered Aug 6, 2018 in Docker by Nilesh
• 7,040 points
1,322 views
0 votes
1 answer

docker missing var/lib/docker folder

Try restarting docker systemctl restart docker or sudo service docker ...READ MORE

answered Aug 1, 2018 in Docker by Kalgi
• 52,370 points
3,368 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,140 points
1,332 views
0 votes
1 answer
0 votes
1 answer

Error: 'logs/gunicorn-error.log' isn't writable [FileNotFoundError(2, 'No such file or directory')

Hi@akhtar, Before trying with a docker container, I ...READ MORE

answered Aug 24, 2020 in Docker by MD
• 95,300 points
1,258 views