This is another blog post on a topic that I constantly see on forums such as Reddit, StackOverflow, and Docker forum – what is the deal with Docker Desktop on Windows versus Windows Server? I decided to write this blog post so it's clear why and what works on a Windows client or Windows Server when it comes to Docker and Docker Desktop.
Most likely, you are familiar with Docker Desktop. Docker Desktop is a one-click-install tool focused on developers writing applications for containers and micro-services. It provides a nice, friendly GUI and CLI to manage your container images and containers running locally.
If you are running containers on a Windows client machine, Docker Desktop is likely the preferred option to run containers. You can run both Windows and Linux containers, albeit, not at the same time. Docker Desktop gives you the option to switch between Linux containers – which use WSL 2 in the background – and Windows containers – which use the underlying containers feature on Windows.
Docker Desktop is built from an open-source project called Moby. It is important to understand that Docker Desktop is a commercial product from the Docker company that follows the updates to the open-source Moby project. The reason this is important is because under the hood, the Moby project calls into containerd – a container runtime that has been accepted as the default container runtime for running containers on Kubernetes. That is true for Linux containers, but not yet for Windows containers. When you switch to Linux containers on Docker Desktop, it uses WSL 2 to run a Linux utility VM that runs your containers via containerd. When you switch to Windows containers, is calls into the Windows APIs via the Host Compute Service (HCS). Updates to Moby are underway to move it to containerd.
At the end of the day, you operate either Linux or Windows containers via Docker Desktop on Windows 10 or 11 pretty much the same way – either via the GUI or CLI.
Docker and Windows Server
On Windows Server, the story is different. First, Docker Desktop is not available for Windows Server. This is because, as mentioned, Docker Desktop is focused on development and testing of containerized applications while Windows Server is supposed to run production scenarios.
So, the question is: How do I run containers on Windows Server? Today, there are three options to run containers on Windows Server:
Docker Community Edition (CE) provides a standard runtime environment for containers with a common API and CLI. It is managed by the open-source community as part of the Moby Project.
Mirantis Container Runtime
The Mirantis Container Runtime, formally known as Docker EE (Enterprise Edition), provides the same functionality as Docker CE plus extra features built specifically for enterprise deployments. Keep in mind that the Mirantis Container Runtime is a paid product provided by Mirantis, but different than Docker Desktop, specifically designed for production scenarios.
Containerd, as mentioned, is an industry-standard container runtime. Since it is available as a daemon for Linux and Windows, it can manage the complete container lifecycle. However, containerd only provides the APIs for the container management. You need a CLI on top of it to be able to interact with it. The most common ones are critcl and nerdctl.
How to install Moby or containerd on Windows Server
For both Moby and containerd, Microsoft provides scripts that download and deploy the necessary components for you to get your environment ready to go.
If you have familiarity with Docker and just want to run Windows containers on it, you should go with the Moby project:
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-DockerCE/install-docker-ce.ps1" -o install-docker-ce.ps1
If you want to deploy a Windows node for use with Kubernetes, on which you'll operate the environment via the Kubernetes APIs, you should try containerd:
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-ContainerdRuntime/install-containerd-runtime.ps1" -o install-containerd-runtime.ps1
More information on these options can be found on our documentation page.
Docker Desktop is the leading tool for running containers, both Windows and Linux. You can run Docker Desktop on Windows 10 and 11, but on Windows Server, you need to choose either Docker CE/Moby, Mirantis Container Runtime, or Containerd with a CLI tool and Microsoft offers scripts to install Moby or Containerd on Windows Server.
I hope this was helpful to you and clarifies what to run on Windows client or Server. Let us know what you think in the comments section below!