Running docker build . -f docker/development/Dockerfile
worked, which allows you to run your docker file from a specified directory other than the root of your application.
Use -f
or --file
to specify the name and location of the Dockerfile
.
This happened to me when trying to run the docker file from a different directory.
I had the COPY failed: stat /var/lib/docker/tmp/docker-builder929708051/XXXX: no such file or directory
and managed to resolve this by specifying the docker file.
It was docker build docker/development/Dockerfile
that caused this issue for me.
I found it strange at first because when i had the Dockerfile
in the apps root directory it worked fine. This will help if you want to manage your environment docker files a little better.