COPY failed: stat /mnt/sda1/var/lib/docker/tmp/docker-builder006125699/src: no such file or directory
7,791
I don’t see any problems with your copy command. Verify that etc actually exists in your working directory: ‘ls -la $(pwd) src/‘ before the docker build command
Related videos on Youtube
Author by
user357835
Updated on September 18, 2022Comments
-
user357835 almost 2 years
When I run this command docker build -t hello-world .
I got this kind of error...what should I do...How to copy file to /var/www/html/
Sending build context to Docker daemon 2.048kB Step 1/3 : FROM php:7.2-apache ---> f046c4ead123 Step 2/3 : COPY src/ /var/www/html/
COPY failed: stat /mnt/sda1/var/lib/docker/tmp/docker-builder006125699/src: no such file or directory
-
GracefulRestart about 5 yearsYour Dockerfile is unable to find the
src/
relative path you set in theCOPY
command. Since you wrote a relative path, that path is relative to the location of the Dockerfile. Since you are building against.
(your current working directory, which appears to be/mnt/sda1/var/lib/docker/tmp/docker-builder006125699
), you should have asrc/
dir, if not that error will occur.
-