Docker - image operating system "windows" cannot be used on this platform

Lea A picture Lea A · Apr 11, 2017 · Viewed 46.5k times · Source

I tried this on my Windows 10 machine:

Dockerfile:

From microsoft/nanoserver
CMD ["echo", "Hello World"]

PS

C:\FSD\Docker\Trial1> docker build -t lea/leatest .
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM microsoft/nanoserver
latest: Pulling from microsoft/nanoserver
bce2fbc256ea: Pulling fs layer
58f68fa0ceda: Pulling fs layer
image operating system "windows" cannot be used on this platform

Answer

BMitch picture BMitch · Apr 11, 2017

Your Docker host is configured to run Linux containers inside of a VM. To run Windows containers, you need to "Switch to Windows containers" in the Docker menu. Documentation on that is available here.


Enter image description here

Enter image description here