简体   繁体   中英

Unable to build a Docker image on Windows 10

Windows 10 Pro 1909
Docker 2.2.0.4 (43472)

Dockerfile starts like this:

FROM debian:stable-20191118

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

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. If you use Linux containers than you will see "Switch to Windows containers..." when you press RMB on Docker.

截屏

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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