Docker Community Forums

Share and learn in the Docker community.

Docker build failing on Docker hub

Hello All,

my dockerfile with copy is failing with the blow error

“COPY failed: stat /var/lib/docker/tmp/docker-builder628515652/ no such file or directory”

Same docker file is working perfectly when doing the docker build locally in my machine.

Thanks and Regards,
Sreejith P

Seems like the issue was with build configuration, finally after lot of failed builds, i figured out the correct configuration

Please mark this thread as resolved.

Thanks and Regards,
Sreejith P


I just ran into the same issue. What build configuration did you have to change to make it work?


The solution is to set the build context appropriately so that the relative path in the Dockerfile COPY is correct.

In your Docker Hub repository go to “Builds” and click on “Configure Automated Builds”. There you can set the “Build Context” for each build rule.