Search code examples
windowsdockerdocker-desktopdocker-for-windows

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


Docker on Windows appears to be what's coming built into Windows Server 2016? and supports running Windows inside a Docker container and using Windows as a Docker container host. Does this support Linux? I don't think so, I think it only supports running Windows Docker containers. This also appears to be maintained by Microsoft.

Docker for Windows appears to be a separate install created by the Docker team to bring Linux Docker to Windows. So Windows can be the Docker host but all containers are still just normal Linux containers. Does this support Windows containers? I don't think so, I think it only supports running Linux Docker containers. This also appears to be maintained by Docker.

One other interesting note is that Docker Tools for Visual Studio appears to only support Docker Desktop for Windows and not Docker on Windows.

What I'm really looking for are the stated differences bettwen the two, some sort of good comparison. What features are each trying to acheive, where are they similar, where are they different. Will they always be different or will they ever come together?


Solution

  • 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.