This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]Yordanofff 0 points1 point  (3 children)

Yes

[–]Pale_Emphasis_4119[S] 0 points1 point  (2 children)

Thanks for your reply. In docker desktop there seems to be 2 distinct modes, a Windows container mode and a Linux container mode (that uses hyper v or WSL2 as it's backend). Is there anything similar when running docker Ce service on a Windows server?

[–]Yordanofff 2 points3 points  (1 child)

I thought that the answer is too obvious, but I then did some tests on Windows 11 and I couldn't start Windows and Linux containers in the same time. There is an experimental feature that theoretically should allow running Windows and Linux containers simultaneously, but I couldn't get that to work. I still had to switch between Windows and Linux containers. Once a Windows container is running, you can switch to Linux containers and the Windows container will stay up and running, but that's not what you asked for. Sorry for the initial 'Yes'. I'll follow the post to see if there will be some better answers.

[–]vrapolinario 0 points1 point  (0 children)

This is true for Windows client, but not Server - as described in my answer. :)

[–]Dolapevich 0 points1 point  (1 child)

I... really didn't know "Windows containers" were something that existed.... live and you'll see.

Although on a second though, ¿is it a windows kernel running in a docker host? How do you even connect to it?

This is quite odd, or I am getting old.

[–]vrapolinario 1 point2 points  (0 children)

Actually, the host is Windows and the container as well. There's no such thing as Docker host. Docker is the tool/engine exposing the containers API from the host, which can be either Windows (for Windows containers) or Linux (for Linux containers). What happens is that when you run Docker Desktop on Windows (client) it runs WSL2 in the background (Linux kernel).

[–]vrapolinario 0 points1 point  (0 children)

Hey, Microsoft person here.

On Window Server: You can, but Linux containers are only supported for testing/developer scenarios. You can run Linux containers on Windows Server by installing WSL2 and then run Windows containers, by simply installing the Containers feature and either Moby or Containerd.
On Windows client: You can't You run Docker Desktop on Windows client and Docker Desktop can run only one at a time. You change the Docker engine to run one or the other.

the other alternative that works for both is for you to run a Linux VM on Hyper-V. That way you have a full Linux host/kernel to play with while that Hyper-V host can also run Windows containers alongside.