无法在Windows 10上构建Docker镜像

11

Windows 10专业版1909
Docker 2.2.0.4(43472)

Dockerfile的开头如下:

FROM debian:stable-20191118

那是唯一可用的部分(或任何类似于Linux的 ubuntu:18.04
像这样的下一行,像这些中的任何一个

RUN DEBIAN_FRONTEND=noninteractive
RUN LC_ALL=en_US.UTF-8
RUN apt-get update -y && apt-get install -y nginx

遇到相同的错误:

The command '/bin/sh -c (insert any of the commands above)' returned a non-zero code: 4294967295:
failed to shutdown container: container ad12191abf0849d5e49bb5dc0570d6ba8eaf2cc5b4e7d77127ed381901fcb672 
encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: 
The virtual machine or container with the specified identifier is not running. (0xc0370110): 
subsequent terminate failed container ad12191abf0849d5e49bb5dc0570d6ba8eaf2cc5b4e7d77127ed381901fcb672 
encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: 
The virtual machine or container with the specified identifier is not running. (0xc0370110)

命令是

docker build -f Dockerfile . --no-cache

1
你找到任何解决方案了吗?我也在苦苦挣扎。 - Eugen Tatuev
1个回答

17

我也遇到了同样的问题。但当我切换到 Linux 容器时,它帮助了我。

如果您使用 Linux 容器,则在 Docker 上按 RMB 时,您将看到“切换到 Windows 容器...”。

屏幕截图


看起来是在“混合”模式下让它能够运行Windows和Linux容器的想法。 - Eugen Tatuev
我在尝试切换到Linux容器时遇到了错误。可能是什么问题? - superachu
Linux构建容器,在Win10下返回相同的错误。 - Maverick

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接