简体   繁体   English

无法在 Windows 10 上构建 Docker 映像

[英]Unable to build a Docker image on Windows 10

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

Dockerfile starts like this: Dockerfile 像这样开始:

FROM debian:stable-20191118

And that is the only part that works (or any other linux like ubuntu:18.04 )这是唯一有效的部分(或任何其他 linux,如ubuntu:18.04
Any next line, like any of these任何下一行,像这些

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

gets the same error:得到同样的错误:

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)

Command is命令是

docker build -f Dockerfile . --no-cache

I had the same problem.我有同样的问题。 But when I switched to Linux containers it helped.但是当我切换到 Linux 容器时,它有所帮助。 If you use Linux containers than you will see "Switch to Windows containers..." when you press RMB on Docker.如果您使用 Linux 容器,那么当您在 Docker 上按 RMB 时,您将看到“切换到 Windows 容器...”。

截屏

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

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