Docker Windows build fails with error: “The system cannot find the path specified”

前端 未结 5 1684
北海茫月
北海茫月 2020-12-15 21:59

I tried to create a directory junction on Docker Windows to create 8.3 . But it failed with the error message below.

D:\\data\\docker\\sample>docker build         


        
相关标签:
5条回答
  • 2020-12-15 22:12

    I'm guessing your issue is actually not related to creating a directory junction (note that your build did complete that step), but is related to exceeding the base size of docker containers (I see you're pulling from windowsservercore, which is about 10GB, and web browsing tells me the default container base size is 10GB).

    Try changing the size to 20GB in the docker daemon config by adding this json:

    "storage-opts": [
      "size=20G"
    ]
    

    I was experiencing the same error message, tried all manner of troubleshooting, and resolved it with that daemon setting.

    0 讨论(0)
  • 2020-12-15 22:15

    For Docker Enterprise this can be configured here C:\ProgramData\docker\config\daemon.json

    "storage-opts":["size=20G"]
    

    If this file does not exist created it

    Link here

    0 讨论(0)
  • 2020-12-15 22:17

    I was not able to resolve this with other methods; what worked for me was deleting and re-pulling the base image. So, it is apparently possible to get this error from a corrupt image.

    0 讨论(0)
  • 2020-12-15 22:17

    It seems that junctions and and hardlinks are not supported by docker for windows.

    I had similar problem trying to create a container with Cygwin inside. Cygwing uses hardlinks a lot. It all went wwll until Docker tried to commit an image and it failed with "hcsshim::ImportLayer - cannot find the path" error. When I got rid of the hardlinks in the container I was able to commit the image without problems.

    0 讨论(0)
  • 2020-12-15 22:33

    check if the project is Running or not ! if it is running finish it. then check the command again

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