Unable to build a Docker image on Windows 10

8

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
linux
windows
docker
asked on Stack Overflow Apr 1, 2020 by Ol_D

1 Answer

7

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.

Screenshot

answered on Stack Overflow Apr 3, 2020 by Bogdan Akopyan • edited Aug 26, 2020 by No Name Pro

User contributions licensed under CC BY-SA 3.0