繁体   English   中英

Docker 在 Windows 容器模式下的 Windows 10 上拉失败

[英]Docker pull fails on Windows 10 in Windows Container mode

我正在尝试在 Windows 10 上本地运行 docker 10: https://docs.microsoft.com/en-us/virtualization/windowsclient-environment?

我的 Windows 版本是:

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.18362 N/A Build 18362.720

Docker 版本为:

Docker version 19.03.8, build afacb8b

{
  "registry-mirrors": [],
  "insecure-registries": [],
  "debug": true,
  "experimental": true
}

Docker Desktop Community : 2.2.0.5 (43884)

这是安装后菜单的外观:即我处于“Windows 容器模式”

在此处输入图像描述

注意:在安装 docker 之前,我确保在 Windows 功能选项中启用了“Containers”和“Hyper V”。

安装 Docker 后,我运行以下命令:

docker pull ubuntu

我收到了这个 output 错误

C:\Users\angshuman>docker run ubuntu
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu

5bed26d33875: Pull complete
f11b29a9c730: Pull complete
930bda195c84: Pull complete
78bf9a5ad49e: Pull complete
Digest: sha256:bec5a2727be7fff3d308193cfde3491f8fba1a2ba392b7546b43a051853a341d
Status: Downloaded newer image for ubuntu:latest

错误:

time="2020-04-13T17:50:47+01:00" level=error msg="Error waiting container: failed to shutdown container: container 21892c2c1e7edf42bb1255809605579aa79cd0b94b1d4b6edd8fd5a55aab87d2 在 hcsshim::System::waitBackground 期间遇到错误:a 失败Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container 21892c2c1e7edf42bb1255809605579aa79cd0b94b1d4b6edd8fd5a55aab87d2 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container具有指定标识符的未运行。(0xc0370110)

知道如何解决这个问题吗?

编辑:在下面的答案中提出建议后

我降级到2.2.0.3experimental: trueWindows Container启用

在此处输入图像描述

这次它下载了图像,仍然没有运行。 问题仍然存在,现在出现不同的错误。

错误:

docker: Error response from daemon: container 0bb1d91f5e1090bc83e8541d923484a1c07dd5adae7a7779ac0f080bd5c11815 encountered an error during CreateProcess: failure in a Windows system call: Unspecified error (0x80004005)
[Event Detail: failed to run runc create/exec call for container 0bb1d91f5e1090bc83e8541d923484a1c07dd5adae7a7779ac0f080bd5c11815: exit status 1 Stack Trace:
github.com/Microsoft/opengcs/service/gcs/runtime/runc.(*container).startProcess
        /go/src/github.com/Microsoft/opengcs/service/gcs/runtime/runc/runc.go:580
github.com/Microsoft/opengcs/service/gcs/runtime/runc.(*runcRuntime).runCreateCommand
        /go/src/github.com/Microsoft/opengcs/service/gcs/runtime/runc/runc.go:471
github.com/Microsoft/opengcs/service/gcs/runtime/runc.(*runcRuntime).CreateContainer
        /go/src/github.com/Microsoft/opengcs/service/gcs/runtime/runc/runc.go:113
github.com/Microsoft/opengcs/service/gcs/core/gcs.(*gcsCore).ExecProcess
        /go/src/github.com/Microsoft/opengcs/service/gcs/core/gcs/gcs.go:351
github.com/Microsoft/opengcs/service/gcs/bridge.(*Bridge).execProcess
        /go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:637
github.com/Microsoft/opengcs/service/gcs/bridge.(*Bridge).execProcess-fm
        /go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:253
github.com/Microsoft/opengcs/service/gcs/bridge.HandlerFunc.ServeMsg
        /go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:72
github.com/Microsoft/opengcs/service/gcs/bridge.(*Mux).ServeMsg
        /go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:146
github.com/Microsoft/opengcs/service/gcs/bridge.(*Bridge).ListenAndServe.func2.1
        /go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:335
runtime.goexit
        /usr/lib/go/src/runtime/asm_amd64.s:1333 
Provider: 00000000-0000-0000-0000-000000000000] 

extra info: {"CommandArgs":["-t"],"WorkingDirectory":"/","Environment":{"HOSTNAME":"0bb1d91f5e10","PATH":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"},"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0],"OCISpecification":{"ociVersion":"1.0.1-dev","process":{"user":{"uid":0,"gid":0},"args":["-t"],"env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","HOSTNAME=0bb1d91f5e10"],"cwd":"/","capabilities":{"bounding":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_FSETID","CAP_FOWNER","CAP_MKNOD","CAP_NET_RAW","CAP_SETGID","CAP_SETUID","CAP_SETFCAP","CAP_SETPCAP","CAP_NET_BIND_SERVICE","CAP_SYS_CHROOT","CAP_KILL","CAP_AUDIT_WRITE"],"effective":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_FSETID","CAP_FOWNER","CAP_MKNOD","CAP_NET_RAW","CAP_SETGID","CAP_SETUID","CAP_SETFCAP","CAP_SETPCAP","CAP_NET_BIND_SERVICE","CAP_SYS_CHROOT","CAP_KILL","CAP_AUDIT_WRITE"],"inheritable":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_FSETID","CAP_FOWNER","CAP_MKNOD","CAP_NET_RAW","CAP_SETGID","CAP_SETUID","CAP_SETFCAP","CAP_SETPCAP","CAP_NET_BIND_SERVICE","CAP_SYS_CHROOT","CAP_KILL","CAP_AUDIT_WRITE"],"permitted":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_FSETID","CAP_FOWNER","CAP_MKNOD","CAP_NET_RAW","CAP_SETGID","CAP_SETUID","CAP_SETFCAP","CAP_SETPCAP","CAP_NET_BIND_SERVICE","CAP_SYS_CHROOT","CAP_KILL","CAP_AUDIT_WRITE"]}},"root":{"path":"rootfs"},"hostname":"0bb1d91f5e10","mounts":[{"destination":"/proc","type":"proc","source":"proc","options":["nosuid","noexec","nodev"]},{"destination":"/dev","type":"tmpfs","source":"tmpfs","options":["nosuid","strictatime","mode=755","size=65536k"]},{"destination":"/dev/pts","type":"devpts","source":"devpts","options":["nosuid","noexec","newinstance","ptmxmode=0666","mode=0620","gid=5"]},{"destination":"/sys","type":"sysfs","source":"sysfs","options":["nosuid","noexec","nodev","ro"]},{"destination":"/sys/fs/cgroup","type":"cgroup","source":"cgroup","options":["ro","nosuid","noexec","nodev"]},{"destination":"/dev/mqueue","type":"mqueue","source":"mqueue","options":["nosuid","noexec","nodev"]},{"destination":"/dev/shm","type":"tmpfs","source":"shm","options":["nosuid","noexec","nodev","mode=1777"]}],"linux":{"resources":{},"namespaces":[{"type":"mount"},{"type":"network"},{"type":"uts"},{"type":"pid"},{"type":"ipc"}],"maskedPaths":["/proc/asound","/proc/acpi","/proc/kcore","/proc/keys","/proc/latency_stats","/proc/timer_list","/proc/timer_stats","/proc/sched_debug","/proc/scsi","/sys/firmware"],"readonlyPaths":["/proc/bus","/proc/fs","/proc/irq","/proc/sys","/proc/sysrq-trigger"]},"windows":{"layerFolders":["C:\\ProgramData\\Docker\\lcow\\ef134f2d5748c591bf21cc2b407c49dd9be012dad5d15052bab87fc00b96444f","C:\\ProgramData\\Docker\\lcow\\4712bcdc17711399918c44b2352c5585457db6b14285cc6b2d6b630ef4ced551","C:\\ProgramData\\Docker\\lcow\\970a55c64e9bb9d56007e940a6ac94de463a7ad4b602f2d829f21c29b92e5369","C:\\ProgramData\\Docker\\lcow\\79eeaef19460e004253147fa7b109664492516495d6c7d63b8631112be468f7d","C:\\ProgramData\\Docker\\lcow\\0bb1d91f5e1090bc83e8541d923484a1c07dd5adae7a7779ac0f080bd5c11815"],"hyperv":{},"network":{"endpointList":["B5E11D3C-E874-406C-BCC0-94E1173E3E1B"],"allowUnqualifiedDNSQuery":true}}}}.

C:\Users\angshuman>docker run 4e5021d210f6 -it
docker: Error response from daemon: container bdd2ed406d421f00c963190cc975e5bf5f1f22b9c3536af687870257968b1fc4 encountered an error during CreateProcess: failure in a Windows system call: Unspecified error (0x80004005)
[Event Detail: failed to run runc create/exec call for container bdd2ed406d421f00c963190cc975e5bf5f1f22b9c3536af687870257968b1fc4: exit status 1 Stack Trace:
github.com/Microsoft/opengcs/service/gcs/runtime/runc.(*container).startProcess
        /go/src/github.com/Microsoft/opengcs/service/gcs/runtime/runc/runc.go:580
github.com/Microsoft/opengcs/service/gcs/runtime/runc.(*runcRuntime).runCreateCommand
        /go/src/github.com/Microsoft/opengcs/service/gcs/runtime/runc/runc.go:471
github.com/Microsoft/opengcs/service/gcs/runtime/runc.(*runcRuntime).CreateContainer
        /go/src/github.com/Microsoft/opengcs/service/gcs/runtime/runc/runc.go:113
github.com/Microsoft/opengcs/service/gcs/core/gcs.(*gcsCore).ExecProcess
        /go/src/github.com/Microsoft/opengcs/service/gcs/core/gcs/gcs.go:351
github.com/Microsoft/opengcs/service/gcs/bridge.(*Bridge).execProcess
        /go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:637
github.com/Microsoft/opengcs/service/gcs/bridge.(*Bridge).execProcess-fm
        /go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:253
github.com/Microsoft/opengcs/service/gcs/bridge.HandlerFunc.ServeMsg
        /go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:72
github.com/Microsoft/opengcs/service/gcs/bridge.(*Mux).ServeMsg
        /go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:146
github.com/Microsoft/opengcs/service/gcs/bridge.(*Bridge).ListenAndServe.func2.1
        /go/src/github.com/Microsoft/opengcs/service/gcs/bridge/bridge.go:335
runtime.goexit
        /usr/lib/go/src/runtime/asm_amd64.s:1333 Provider: 00000000-0000-0000-0000-000000000000] extra info: {"CommandArgs":["-it"],"WorkingDirectory":"/","Environment":{"HOSTNAME":"bdd2ed406d42","PATH":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"},"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0],"OCISpecification":{"ociVersion":"1.0.1-dev","process":{"user":{"uid":0,"gid":0},"args":["-it"],"env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","HOSTNAME=bdd2ed406d42"],"cwd":"/","capabilities":{"bounding":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_FSETID","CAP_FOWNER","CAP_MKNOD","CAP_NET_RAW","CAP_SETGID","CAP_SETUID","CAP_SETFCAP","CAP_SETPCAP","CAP_NET_BIND_SERVICE","CAP_SYS_CHROOT","CAP_KILL","CAP_AUDIT_WRITE"],"effective":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_FSETID","CAP_FOWNER","CAP_MKNOD","CAP_NET_RAW","CAP_SETGID","CAP_SETUID","CAP_SETFCAP","CAP_SETPCAP","CAP_NET_BIND_SERVICE","CAP_SYS_CHROOT","CAP_KILL","CAP_AUDIT_WRITE"],"inheritable":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_FSETID","CAP_FOWNER","CAP_MKNOD","CAP_NET_RAW","CAP_SETGID","CAP_SETUID","CAP_SETFCAP","CAP_SETPCAP","CAP_NET_BIND_SERVICE","CAP_SYS_CHROOT","CAP_KILL","CAP_AUDIT_WRITE"],"permitted":["CAP_CHOWN","CAP_DAC_OVERRIDE","CAP_FSETID","CAP_FOWNER","CAP_MKNOD","CAP_NET_RAW","CAP_SETGID","CAP_SETUID","CAP_SETFCAP","CAP_SETPCAP","CAP_NET_BIND_SERVICE","CAP_SYS_CHROOT","CAP_KILL","CAP_AUDIT_WRITE"]}},"root":{"path":"rootfs"},"hostname":"bdd2ed406d42","mounts":[{"destination":"/proc","type":"proc","source":"proc","options":["nosuid","noexec","nodev"]},{"destination":"/dev","type":"tmpfs","source":"tmpfs","options":["nosuid","strictatime","mode=755","size=65536k"]},{"destination":"/dev/pts","type":"devpts","source":"devpts","options":["nosuid","noexec","newinstance","ptmxmode=0666","mode=0620","gid=5"]},{"destination":"/sys","type":"sysfs","source":"sysfs","options":["nosuid","noexec","nodev","ro"]},{"destination":"/sys/fs/cgroup","type":"cgroup","source":"cgroup","options":["ro","nosuid","noexec","nodev"]},{"destination":"/dev/mqueue","type":"mqueue","source":"mqueue","options":["nosuid","noexec","nodev"]},{"destination":"/dev/shm","type":"tmpfs","source":"shm","options":["nosuid","noexec","nodev","mode=1777"]}],"linux":{"resources":{},"namespaces":[{"type":"mount"},{"type":"network"},{"type":"uts"},{"type":"pid"},{"type":"ipc"}],"maskedPaths":["/proc/asound","/proc/acpi","/proc/kcore","/proc/keys","/proc/latency_stats","/proc/timer_list","/proc/timer_stats","/proc/sched_debug","/proc/scsi","/sys/firmware"],"readonlyPaths":["/proc/bus","/proc/fs","/proc/irq","/proc/sys","/proc/sysrq-trigger"]},"windows":{"layerFolders":["C:\\ProgramData\\Docker\\lcow\\ef134f2d5748c591bf21cc2b407c49dd9be012dad5d15052bab87fc00b96444f","C:\\ProgramData\\Docker\\lcow\\4712bcdc17711399918c44b2352c5585457db6b14285cc6b2d6b630ef4ced551","C:\\ProgramData\\Docker\\lcow\\970a55c64e9bb9d56007e940a6ac94de463a7ad4b602f2d829f21c29b92e5369","C:\\ProgramData\\Docker\\lcow\\79eeaef19460e004253147fa7b109664492516495d6c7d63b8631112be468f7d","C:\\ProgramData\\Docker\\lcow\\bdd2ed406d421f00c963190cc975e5bf5f1f22b9c3536af687870257968b1fc4"],"hyperv":{},"network":{"endpointList":["C19D44B9-33F9-470A-8EC8-5C9283CE25FE"],"allowUnqualifiedDNSQuery":true}}}}.

谢谢

昂舒曼

这似乎是microsoft/hcsshim 问题 624

Windows 刚刚进行了更新并制定了该驱动程序的新副本。

  • 将 C:\Windows\System32\drivers\cbfs6.sys 重命名为其他名称(或将其删除)。
  • 取出容器。
  • 重启。

这又是指docker/for-win/issue 3884

nsoftware.com 的好人刚刚用他们的 SFTP Drive v2 解决了这个问题。
事实上,问题出在 cbfs 驱动程序中。 新版本按预期工作,不会与 Docker 冲突。

但是microsoft/hcsshim issue 790也提到了同样的错误:

该问题存在于 windows 2.2.0.4 和 2.2.0.5 的 Docker 桌面 CE 中

降级到 2.2.0.3 解决了这个问题。


如果你想“在 Windows 上本地运行容器”, 下一页会提到mcr.microsoft.com/windows/nanoserver:1903类的图像

Ubuntu 映像在此模式下不起作用,仅在 Linux 容器模式下工作。


总结一下:

  1. 将 Docker 桌面降级到 2.2.0.3
  2. 重启机器(不要忘记)
  3. 删除所有以前创建的容器/图像(如果有)
  4. docker run -it ubuntu - (出于某种原因,显示 bash Z2591C98B70119FE624E918ZB & 然后退出交互模式)
  5. 再次运行docker run -it ubuntu - 现在,现在进入交互模式(第二次)并停留

这行得通!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM