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

后端 未结 30 2252
野性不改
野性不改 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:42

    Be sure your DOCKERfile is in the ROOT of the application directory, I had mine in src which resulted in this error because Docker was not finding the path to DOCKERfile

    0 讨论(0)
  • 2020-11-29 21:43

    I have got this error (in MacBook) though I used correct command to create image,

    docker build -t testimg .
    

    Later I found that path is the problem. Just navigate to the correct path that contains docker file. Just double check your current working directory .Nothing to panic!

    0 讨论(0)
  • Below command worked for me docker build -t docker-whale -f Dockerfile.txt .

    0 讨论(0)
  • 2020-11-29 21:47

    Two ways to build a dockerfile:

    You can decide not to specify the file name of which to build from and just build it specifying a path (doing it this way the file name must be Dockerfile with no extension appended, eg: docker build -t docker-whale:tag path/to/Dockerfile

    or

    You can specify a file with -f and it doesn't matter what extension (within reason .txt, .dockerfile, .Dockerfile etc..) you decide to use, eg docker build -t docker-whale:tag /path/to/file -f docker-whale.dockerfile.

    0 讨论(0)
  • 2020-11-29 21:48

    I got this on Windows when the path I was working in was under a Junction directory. So my fix was to not work under that path.

    0 讨论(0)
  • 2020-11-29 21:49

    I had created my DockerFile by VS2017 Docker Support tool and had the same error. After a while I realised I was not in the correct directory that contains the Dockerfile (~\source\repos\DockerWebApplication\). cd'ed to the correct file (~/source/repos/DockerWebApplication/DockerWebApplication) which was inside the project and successfully created the docker image.

    0 讨论(0)
提交回复
热议问题