while executing following command:
docker build -t docker-whale .
check that Dockerfile is present in your current working directory.
The error message is misleading. The problem has nothing to do with symlinks really. It is usually only that docker cannot find the Dockerfile describing the build.
Typical reasons are these:
Dockerfile
. If it is called, for instance, dockerfile
, .Dockerfile
, Dockerfile.txt
, or other, it will not be found.docker build contextdir
, the Dockerfile must be at contextdir/Dockerfile
. If you have it in, say, ./Dockerfile
instead, it will not be found.If you are working on windows 8 you would be using Docker toolbox. From the mydockerbuild directory run the below command as your Dockerfile is a textfile
docker build -t docker-whale -f ./Dockerfile.txt .
The name of the file should be Dockerfile
and not .Dockerfile
. The file should not have any extension.
I had named my file dockerfile instead of Dockerfile (capitalized), and once I changed that, it started processing my "Dockerfile".
Just Remove the extension .txt from Dockerfile and run the command
docker build -t image-name
It will work for sure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With