Interview Prep/Docker/Containers, VMs & Isolation Internals

Can a Linux container run a Windows application, or the reverse?

IntermediateConceptContainers, VMs & Isolation Internals
Answer

No. Containers share the host kernel, so a Linux image needs a Linux kernel and a Windows image needs a Windows kernel. Docker Desktop on Mac/Windows runs a hidden Linux VM (or WSL2) to host Linux containers. Windows containers need a Windows host with matching build versions (process isolation) or Hyper-V isolation.

All Docker questions Roadmap: Docker & containers

More on Containers, VMs & Isolation Internals