26

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 -t sample . Sending build context to Docker daemon 1.272GB Step 1/4 : FROM microsoft/windowsservercore ---> 2cddde20d95d Step 2/4 : RUN fsutil.exe behavior set disable8dot3 0 ---> Running in ec6e7cc09ec6 The registry state is now: 0 (Enable 8dot3 name creation on all volumes). ---> 53805bc21858 Removing intermediate container ec6e7cc09ec6 Step 3/4 : RUN mklink /J "C:\PROGRA~1" "C:\Program Files" ---> Running in 2116f2070e6a Junction created for C:\PROGRA~1 <<===>> C:\Program Files re-exec error: exit status 1: output: time="2017-10-03T16:15:54+09:00" level=error msg="hcsshim::ImportLayer failed in Win32: The system cannot find the path specified. (0x3) layerId=\\?\C:\ProgramData\Docker\windowsfilter\5234d5f7cd7c2669db1818d9227a4be2822eeb72fc30071a495de78cd578b9f3 flavour=1 folder=C:\WINDOWS\TEMP\hcs088640839" hcsshim::ImportLayer failed in Win32: The system cannot find the path specified. (0x3) layerId=\\?\C:\ProgramData\Docker\windowsfilter\5234d5f7cd7c2669db1818d9227a4be2822eeb72fc30071a495de78cd578b9f3 flavour=1 folder=C:\WINDOWS\TEMP\hcs088640839 

The Dockerfile was below:

FROM microsoft/windowsservercore RUN fsutil.exe behavior set disable8dot3 0 RUN mklink /J "C:\PROGRA~1" "C:\Program Files" CMD [ "powershell" ] 

How can I create a directory juction on Docker Windows?

5 Answers 5

30

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" ] 

daemon config

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

Sign up to request clarification or add additional context in comments.

1 Comment

This saved me. I've had a build failing for a few days now and don't know why I didn't stumble across this sooner. Finally succeeded. Where I could see this error happening for any number of reasons, I bet this will be a large number of cases. This should probably be marked as the answer seeing as OP never came back.
1

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

Comments

0

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

Comments

0

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.

Comments

0

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.

(For reference, my error was The system cannot find the path specified. (0x2) not The system cannot find the path specified. (0x3).)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.