I have the following issue. I'm using Windows 10 version 21H1. First I installed Docker desktop, but when I ran it (as Windows container) I ran into hyper-v issues. So finally I followed the steps here: https://poweruser.blog/docker-on-windows-10-without-hyper-v-a529897ed1cc
That helped me at least have a running docker daemon.
Now I'm trying to create a Docker container where I can run .NET (.exe) applications and I can't seem to manage that. First I tried to find a Docker image that corresponds to my local Windows, based on this: https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility?tabs=windows-server-20H2%2Cwindows-10-21H1
However, having
FROM mcr.microsoft.com/windows/nanoserver:win10-21h1-preview
in my Dockerfile resulted in an error when I ran the Docker image/container:
docker: Error response from daemon: hcs::CreateComputeSystem bb65c4f05b41cb637f2e6cda7a6201aa5af8f51659b299957be0e45eb3e5dab9: The container operating system does not match the host operating system.
The only thing that worked was:
FROM mcr.microsoft.com/windows/nanoserver:2004
but with this image I don't seem to have any tools to run a .NET application; I don't even have the powershell.
So in short, what's the way to run a .NET exe inside a Docker container on Windows 10 ?
Thanks,
Greetings,
Sorin