Docker Windows构建失败,并显示错误:“系统找不到指定的路径”。

编程入门 行业动态 更新时间:2024-10-25 02:26:45
本文介绍了Docker Windows构建失败,并显示错误:“系统找不到指定的路径”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图在Docker Windows上创建目录结以创建8.3。但是它失败并显示以下错误消息。

D:\data\docker\sample> docker build -t sample 。 将构建上下文发送到Docker守护程序1.272GB 步骤1/4:来自microsoft / windowsservercore ---> 2cddde20d95d 步骤2/4:运行fsutil.exe行为设置disable8dot3 0 --->在ec6e7cc09ec6 中运行注册表状态现在为:0(在所有卷上启用8dot3名称创建)。 ---> 53805bc21858 删除中间容器ec6e7cc09ec6 步骤3/4:运行mklink / J C:\PROGRA〜1 C:\Program Files --->在2116f2070e6a中运行为C:\PROGRA〜1<< ===> C:\程序文件重新执行错误:退出状态1:输出:time = 2017-10-03T16:15:54 + 09:00 level = error msg = hcsshim :: ImportLayer失败Win32:系统找不到指定的路径(0x3)layerId = \\?\C:\ProgramData\Docker\windowsfilter\5234d5f7cd7c2669db1818d9227a4be2822eeb72fc30071a495de78cd578b9f3 flavour = 1文件夹= C:\WINDOWS\TEMP\ \hcs088640839 hcsshim :: ImportLayer在Win32中失败:系统找不到指定的路径。 (0x3)layerId = \\?\C:\ProgramData\Docker\windowsfilter\5234d5f7cd7c2669db1818d9227a4be2822eeb72fc30071a495de78cd578b9f3 flavour = 1文件夹= C:\WINDOWS\TEMP\hcs088640839

Dockerfile如下:

从microsoft / windowsservercore 运行fsutil.exe行为设置disable8dot3 0 运行mklink / J C:\PROGRA〜1 C:\Program Files CMD [ powershell ]

如何在Docker Windows上创建目录连接?

解决方案

我猜您的问题实际上与创建目录结点无关(请注意,您的构建确实完成了该步骤),但与超出基本大小有关的Docker容器(我看到您正在从Windowsservercore(约10GB)和

我遇到了相同的错误消息,尝试了各种故障排除方法,并使用该守护程序设置解决了该问题。

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?

解决方案

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.

更多推荐

Docker Windows构建失败,并显示错误:“系统找不到指定的路径”。

本文发布于:2023-11-06 01:20:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1562366.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:找不到   路径   错误   系统   Docker

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!