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

后端 未结 30 2375
野性不改
野性不改 2020-11-29 21:23

I just downloaded Docker Toolbox for Windows 10 64bit today. I\'m going through the tutorial. I\'m receving the following error when trying to build an image using a Docke

30条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-29 21:54

    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.

提交回复
热议问题