What's the difference between Docker for Windows and Docker on Windows?

Docker on Windows is a colloquial way to refer to just the Docker Engine running on Windows. I find it helpful to think of this as a Windows Container Host, so yes Windows containers only. This would be what you would run on a Windows Server 2016 machine. So maybe a better name is Docker for Windows Server which I believe people have used as well. I still prefer a Windows Container Host. Which means it only has the Docker Engine at the end of the day, doesn't even need to have any of the Docker clients (docker CLI, docker-compose, etc).

Docker Desktop for Windows is a product meant for running both Linux and Windows containers on Windows. It's not meant for a production environment, and instead is meant for a desktop/client SKU of Windows, hence the Windows 10 requirement. So you could think of this as Docker for Windows 10. Because DfW can run both container types, there are different configurations that it sets up on your machine:

  • When using Linux Containers, DfW creates a MobyLinuxVM with Hyper-V inside of which it runs Linux containers, transparently, as if they were running on the Windows 10 host.
  • When using Windows Containers, DfW installs the same components as Docker on Windows so that you have a Windows Container Host. You have the Windows Docker Engine setup now. This then allows you to run windows containers on a Win 10 client SKU.

Theoretically you could install DfW on Windows Server, I haven't tried so I don't know if this would fail, but why would you want to run Linux containers on a Windows Host in production? In production, you would have Linux Container Hosts that run linux containers and Windows Container Hosts that run windows containers, this would avoid overhead and simplify things.


Just to add on top of Wes's answer on Docker for Windows and few details about the experimental LCOW which is what you are looking for a side by side execution of Windows and Linux containers on the Windows host machine.

Right now there are two ways to run Linux containers with Docker for Windows and Hyper-V:

  1. Run Linux containers in a full Linux VM - this is what Docker
    typically does today.
  2. Run Linux containers On Windows (LCOW) with Hyper-V isolation - this is a new option in Docker for Windows.

In the 1st approach, Docker for Windows windows will have docker daemon service on the Windows host machine as well as it will be available on Linux MOBY VM. So basically, you will have 2 different docker hosts. One which is running on your Windows Host Machine, Managing only Windows Containers and other which is running on your Linux Moby VM and Managing only Linux Containers.

It is important to note that, All Linux Containers will share a Single Linux Kernel on Moby VM and All Windows Containers will share Single Windows Kernel on Windows Host Machine.

enter image description here

Things are really getting interesting with the 2nd approach,

Linux containers with Hyper-V isolation run each Linux container in an optimized Linux VM with just enough OS to run containers. Each Linux container has its own kernel and its own VM sandbox. They're also managed by Docker on Windows directly.

enter image description here

The main difference here in this approach is that there is only one docker daemon service is running on Windows Host Machine and managing both Windows and Linux containers.

All Windows Containers will Share Single Windows Kernel while Each Linux Container will have its own Linux Kernel

To understand more in details, please refer https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/linux-containers