Docker: unable to prepare context: unable to evaluate symlinks in Dockerfile path: GetFileAttributesEx Docker: unable to prepare context: unable to evaluate symlinks in Dockerfile path: GetFileAttributesEx docker docker

Docker: unable to prepare context: unable to evaluate symlinks in Dockerfile path: GetFileAttributesEx


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 has wrong name.
    It must be called Dockerfile. If it is called, for instance, dockerfile, .Dockerfile, Dockerfile.txt, or other, it will not be found.
  • Dockerfile is not in context.
    If you say docker build contextdir, the Dockerfile must be at contextdir/Dockerfile. If you have it in, say, ./Dockerfile instead, it will not be found.
  • Dockerfile does not exist at all.
    Sounds silly? Well, I got the above error message from my GitLab CI after I had written a nice Dockerfile, but forgotten to check it in. Silly? Sure. Unlikely? No.


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 .