My understanding is that Docker Desktop on Windows often runs Linux containers inside a lightweight Linux VM through WSL2 or Hyper-V. If Windows Server can run without a graphical desktop, why can't Docker run Linux containers directly on the Windows kernel? What technical features require the VM, and can Windows containers run directly on Windows instead?
5 Answers
The VM is not required because Windows needs a graphical interface; it is required because the container’s kernel must match the image. The rough stack is hardware, kernel, and operating system. A VM virtualizes the hardware so another kernel can run, while a container shares the existing kernel. Therefore, Windows can run Windows containers directly, but Linux containers need a Linux environment—provided by WSL2, Hyper-V, or another virtual machine.
Windows does support native Windows containers. They contain Windows executables and DLLs and can share the Windows kernel with the host, for example by using process isolation. Hyper-V isolation is another option when stronger separation is needed. However, a Windows kernel cannot run a normal Linux container image, just as a Linux kernel cannot directly run a Windows container image.
The important distinction is between Linux containers and Windows containers. Linux containers depend heavily on Linux kernel features such as namespaces and cgroups for process isolation, resource limits, filesystem behavior, and networking. A console-only Windows installation still uses the Windows kernel, so removing the desktop environment does not make it compatible with Linux containers. The lightweight VM supplies an actual Linux kernel, which is why Docker can run Linux images there.
Docker itself is more than an advanced chroot. The container runtime relies on kernel-level isolation and resource-management mechanisms. Linux has a mature and widely used implementation of those features, while Windows has its own container technology with different compatibility rules. Since most container images and tooling target Linux, running a small Linux VM is generally the simplest and most compatible solution on Windows.
Native Windows containers are real, but they are less commonly used and have stricter host/container version compatibility requirements. Linux containers also tend to have broader image support and a more mature ecosystem, so many Windows users encounter the Linux VM path by default. Networking and filesystem integration can sometimes add overhead or configuration headaches, but those are practical issues rather than the fundamental reason for the VM.

That clears it up. I was mixing up a headless Windows installation with having a Linux-compatible kernel. The desktop versus console distinction isn’t the relevant part.