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

时间:2018-06-18 10:56:07

标签: 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.

但真正有趣的部分是当我尝试拉出特定的微软图像时,我收到了相同的错误消息。 (这是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.

如果我没有指定版本号(并且它默认为最新版本),那么在服务器上获取nano服务器没有问题

但是将我的图像提供给服务器仍然存在问题。

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

我在dockerfile中试过这些:

FROM microsoft/aspnetcore:2.0-nanoserver-1709 AS base
and
FROM microsoft/aspnetcore:2.0-nanoserver-1803 AS base

我的服务器信息:

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

1 个答案:

答案 0 :(得分:3)

This error message typically indicates that the host system is running an older kernel version than that of the Docker image. As you can see in the table on the Windows Container Version Compatibility page, Windows Server 2016 doesn't support containers based on Windows Server version 1709 or Windows Server version 1803. However, Windows 10 version 1803 does support them through Hyper-V isolation mode, which is why the images were able to work correctly on your own machine.

Your attempts at using different base image versions are almost correct, you simply need the right tag for Windows Server 2016, as listed under the "Windows Server 2016 amd64 tags" section of the aspnetcore image page on Docker Hub:

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

This will use the build of the ASP.NET Core image that was built against the Windows Server 2016 version of the Nano Server image, which can then be used under a Windows Server 2016 host system.