无法从docker提取图像,ProcessUtilityVMImage无法找到指定的路径

bar*_*ine 4 docker

我制作了一个.net核心应用程序,并将其上传到docker hub

当我尝试将其拉到自己的计算机上时(赢得10),它就可以正常工作

当我尝试将其拉到服务器(服务器2016)时,出现错误:

docker pull arrivaflg/flg:20180618104928

....

failed to register layer: re-exec error: exit status 1: output: ProcessUtilityVMImage \\?\C:\ProgramData\docker\windowsfilter\cf1f49a6508aaa657768d667c58779e571392a80be0ba7519fe0835ac2476402\UtilityVM: The system cannot find the path specified.
Run Code Online (Sandbox Code Playgroud)

但是真正有趣的部分是,当我尝试提取特定的Microsoft映像时,出现了SAME错误消息。(这是Visual Studio在我的机器上的docker文件中使用的版本1709)

c:\tmp>docker pull microsoft/nanoserver:1709
1709: Pulling from microsoft/nanoserver
407ada6e90de: Extracting [==================================================>]  81.04MB/81.04MB
85710d780d68: Download complete
failed to register layer: re-exec error: exit status 1: output: ProcessUtilityVMImage \\?\C:\ProgramData\docker\windowsfilter\cf1f49a6508aaa657768d667c58779e571392a80be0ba7519fe0835ac2476402\UtilityVM: The system cannot find the path specified.
Run Code Online (Sandbox Code Playgroud)

如果我未指定版本号(默认为最新版本),则在服务器上安装Nano服务器没有问题

但是,将地雷图像发送到服务器仍然是一个问题。

所以我猜我应该使用特定版本的nano服务器。

我已经在我的dockerfile中尝试过这些:

FROM microsoft/aspnetcore:2.0-nanoserver-1709 AS base
and
FROM microsoft/aspnetcore:2.0-nanoserver-1803 AS base
Run Code Online (Sandbox Code Playgroud)

我的服务器信息:

C:\Windows\system32>docker info
Containers: 3
 Running: 0
 Paused: 0
 Stopped: 3
Images: 3
Server Version: 17.06.2-ee-11
Storage Driver: windowsfilter
 Windows:
Logging Driver: json-file
Plugins:
 Volume: local
 Network: l2bridge l2tunnel nat null overlay transparent
 Log: awslogs etwlogs fluentd json-file logentries splunk syslog
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.2312.amd64fre.rs1_release.180607-1919)
Operating System: Windows Server 2016 Datacenter
OSType: windows
Architecture: x86_64
CPUs: 2
Total Memory: 4GiB
Name: AWS1twAROS001
ID: IVVQ:GK2Q:DNJ7:PW6W:GYZ7:WYQM:65VV:Q4JM:6BEL:5CGQ:ISXY:AWEF
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Run Code Online (Sandbox Code Playgroud)

小智 5

该错误消息通常表明主机系统运行的内核版本比Docker映像的内核版本旧。如您在Windows容器版本兼容性页面上的表中所见,Windows Server 2016不支持基于Windows Server版本1709或Windows Server版本1803的容器。但是,Windows 10版本1803 确实通过Hyper-V隔离模式支持它们。 ,这就是为什么图像能够在您自己的计算机上正常工作的原因。

您尝试使用不同的基本映像版本几乎是正确的,您只需要Windows Server 2016的正确标签,就如Docker Hub上图像页面“ Windows Server 2016 amd64标签”部分所列:aspnetcore

FROM microsoft/aspnetcore:2.0-nanoserver-sac2016 AS base

这将使用针对Windows Server 2016版本的Nano Server映像构建的ASP.NET Core映像,然后可以在Windows Server 2016主机系统下使用。