COPY failed: stat /var/lib/docker/tmp/docker-builder506410735/root/page: no such file or directory

0 votes

Hi Guys,

I am trying to use 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 3 in Docker by akhtar
• 14,590 points

1 answer to this question.

0 votes


To copy files from base system to 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 folder that you want to copy should be present in the same folder.

answered Jun 4 by MD
• 32,730 points

Related Questions In Docker

+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
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
• 6,970 points
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
• 51,890 points
0 votes
2 answers

How do I copy a file from docker container to host?

Instead of using docker run you could ...READ MORE

answered Aug 13, 2019 in Docker by Sirajul
• 54,080 points
0 votes
1 answer
0 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
• 57,530 points
0 votes
1 answer