I want to run a Linux Docker-Container on Windows Server-2022 without to login to windows and starting Docker Desktop. I managed to create a Windows-Service for dockerd. But there I can not create Linux-Containers. Errormessage:
docker: image operating system "linux" cannot be used on this platform.
As docker runs as a Windows-Service, I can not change the Engine with dockerCLI, or I don't no how. This solution changes the Engine for my Windows-User but not for the Windows-Service. On my Windows-User I can run Linux-Containers without a Problem.
My Question is: How can I run a Linux Docker-Container permanently on Windows Server 2022 without the need to login on Windows?
You can achieve this by installing WSL2 on the machine and run docker through WSL2
https://techcommunity.microsoft.com/t5/itops-talk-blog/using-wsl-2-on-windows-server-2022-to-run-linux-containers/ba-p/3624745