无法在Windows 10上构建Docker映像 [英] Unable to build a Docker image on Windows 10
本文介绍了无法在Windows 10上构建Docker映像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Windows 10 Pro 1909
Docker 2.2.0.4(43472)
Windows 10 Pro 1909
Docker 2.2.0.4 (43472)
Dockerfile的启动如下:
Dockerfile starts like this:
FROM debian:stable-20191118
那是唯一有效的部分(或其他任何Linux,例如 ubuntu:18.04
)
任何下一行,如其中任何
And that is the only part that works (or any other linux like 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
得到相同的错误:
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
推荐答案
我遇到了同样的问题。但是,当我切换到Linux容器时,它有所帮助。
如果您使用Linux容器,则会看到切换到Windows容器...。当您在Docker上按RMB时。
I had the same problem. But when I switched to Linux containers it helped. If you use Linux containers than you will see "Switch to Windows containers..." when you press RMB on Docker.
这篇关于无法在Windows 10上构建Docker映像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文