无法在 Windows 10 上构建 Docker 映像

Ol_*_*l_D 10 linux windows docker

视窗 10 专业版 1909
Docker 2.2.0.4 (43472)

Dockerfile 像这样开始:

FROM debian:stable-20191118
Run Code Online (Sandbox Code Playgroud)

这是唯一有效的部分(或任何其他类似的 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
Run Code Online (Sandbox Code Playgroud)

得到同样的错误:

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)
Run Code Online (Sandbox Code Playgroud)

命令是

docker build -f Dockerfile . --no-cache
Run Code Online (Sandbox Code Playgroud)

小智 15

我有同样的问题。但是当我切换到 Linux 容器时,它有所帮助。如果您使用 Linux 容器,那么当您在 Docker 上按 RMB 时,您将看到“切换到 Windows 容器...”。

截屏