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
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.