Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 352
Ol_D Avatar asked Apr 01 '20 09:04

Ol_D


People also ask

Why is Docker not working Windows 10?

Operating SystemIf you do not run a 64-bit version of Windows Windows 10 Pro, Enterprise, or Education; 1511 November update, Build 10586 or later, you cannot run Docker for Windows. You can install Docker Toolbox if you have a 64-bit version of Windows 7 or later. Alternately, you do have the option to upgrade.

How do I create a Docker container in Windows 10?

On our Windows 10 machine, we'll first need to download Docker for Windows Community Edition. Once downloaded, run the installer. When complete, it will ask you to log out of Windows. Log out and log back in again.

Is Docker supported on Windows 10?

Docker Desktop for Windows runs on Windows 10. Container type: Microsoft supports Windows Server containers with Hyper-V isolation.

Is Windows 10 Pro required for Docker?

Windows 10 and 11You can install Docker on Windows 10 or 11 Professional and Enterprise editions by using the following steps. Download and install Docker Desktop and create a Docker account if you don't already have one.


1 Answers

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

like image 100
Bogdan Akopyan Avatar answered Sep 24 '22 22:09

Bogdan Akopyan