我尝试在 Docker Windows 上创建一个目录连接来创建 8.3 。但它失败并出现以下错误消息。
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
Dockerfile 如下:
FROM microsoft/windowsservercore
RUN fsutil.exe behavior set disable8dot3 0
RUN mklink /J "C:\PROGRA~1" "C:\Program Files"
CMD [ "powershell" ]
如何在 Docker Windows 上创建目录连接?
最佳答案
我猜您的问题实际上与创建目录连接无关(请注意,您的构建确实完成了该步骤),但与超出 docker 容器的基本大小有关(我看到您从 windowsservercore 中提取,大约 10GB,web browsing 告诉我默认容器基本大小为 10GB。
尝试通过添加此 json 在 docker daemon 配置中将大小更改为 20GB:
"storage-opts": [
"size=20G"
]
我遇到了同样的错误消息,尝试了各种故障排除方法,并使用该守护程序设置解决了问题。
关于windows - Docker Windows 构建失败并出现错误 : "The system cannot find the path specified",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46539165/