Introduction

Docker on Windows Server 2022 enables you to run containerized workloads natively on the Windows kernel, without requiring a Linux virtual machine. Windows Server 2022 ships with built-in support for Windows Containers and, through optional configuration, Linux Containers on Windows (LCOW). This guide walks through installing Docker Engine via the official Microsoft-provided PowerShell module, configuring the Docker service, working with Windows container images from the Microsoft Container Registry, and managing the containerd runtime that underpins modern Docker installations on Windows.

Prerequisites

Before installing Docker you need a fully updated Windows Server 2022 installation. Ensure you have internet access, PowerShell 5.1 or later, and that TLS 1.2 is enabled for the session. You also need administrative privileges. Open PowerShell as Administrator and force TLS 1.2 before running any module installation commands:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

You should also verify that the NuGet package provider is available, since the DockerMsftProvider module depends on it:

Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force

Installing the DockerMsftProvider Module

Microsoft maintains a PowerShell Gallery module called DockerMsftProvider that acts as a package source for Docker on Windows Server. This is the recommended installation path for Windows Server 2022. Register the module and trust the gallery before proceeding:

Install-Module -Name DockerMsftProvider -Repository PSGallery -Force

After the module installs, use it to install the Docker package itself. The DockerMsftProvider module fetches the correct version of Docker Engine for your server edition:

Install-Package -Name docker -ProviderName DockerMsftProvider -Force

Once installation completes, restart the server to allow kernel-mode components to load properly:

Restart-Computer -Force

Starting and Enabling the Docker Service

After the server reboots, open a new PowerShell session as Administrator. The Docker Engine runs as a Windows service named “docker”. Start it and configure it to launch automatically at boot:

Start-Service docker
Set-Service -Name docker -StartupType Automatic

Verify the service is running:

Get-Service docker

You should see the service listed as Running. You can also confirm the Docker client is functional by querying its version:

docker version

This command returns both the Client and Server (Engine) version information. A typical output on Windows Server 2022 shows Docker Engine version 24.x or later, with the OS/Arch listed as windows/amd64 for the server component.

Exploring Docker Info

The docker info command provides a comprehensive overview of the Docker environment, including the number of containers, images, storage driver, and runtime details:

docker info

Key fields to note on a Windows Server 2022 installation include the Storage Driver (typically windowsfilter), the OS/Arch (windows/amd64), the Isolation (process by default on Server), and the Runtime listed as containerd. The containerd runtime replaced the legacy daemon-managed runtime starting with Docker 23.x and is the standard runtime for Windows containers.

Windows Containers vs Linux Containers on Windows (LCOW)

Windows Server 2022 supports two container types. Windows Containers run processes that use the Windows kernel directly — these are the native container type for Windows Server and use either process isolation (shared kernel with the host) or Hyper-V isolation (each container runs in a lightweight VM). Linux Containers on Windows (LCOW) use the Windows Subsystem for Linux 2 infrastructure to run Linux container images on a Windows Server host, though LCOW is less common in production server environments compared to running Linux containers on dedicated Linux hosts.

To check the current isolation mode and switch between them, Docker accepts the –isolation flag at runtime. Process isolation is the default on Windows Server:

docker run --isolation=process mcr.microsoft.com/windows/servercore:ltsc2022 cmd /c ver

To use Hyper-V isolation (requires the Hyper-V feature to be installed):

docker run --isolation=hyperv mcr.microsoft.com/windows/servercore:ltsc2022 cmd /c ver

Pulling Windows Container Images from the Microsoft Container Registry

Microsoft hosts all official Windows container base images at mcr.microsoft.com. The primary base images for Windows Server 2022 workloads are:

Windows Server Core — a near-full Windows Server installation without the GUI, suited for applications requiring broad Win32 API compatibility:

docker pull mcr.microsoft.com/windows/servercore:ltsc2022

Nano Server — a minimal Windows image with a small footprint, optimized for .NET Core and cloud-native workloads:

docker pull mcr.microsoft.com/windows/nanoserver:ltsc2022

Windows Server — the most complete base image, including most Windows APIs:

docker pull mcr.microsoft.com/windows/server:ltsc2022

The ltsc2022 tag indicates the Long-Term Servicing Channel build matching Windows Server 2022. You must use base images whose Windows version matches or is compatible with your host OS version; mismatched kernel versions will prevent containers from running under process isolation.

Running Your First Windows Container

Once the image is pulled, run a basic container to confirm everything works. The following command runs a Windows Server Core container and executes a simple command to print the Windows version:

docker run --rm mcr.microsoft.com/windows/servercore:ltsc2022 cmd /c ver

For an interactive container with a command prompt, use the -it flag with cmd:

docker run -it mcr.microsoft.com/windows/servercore:ltsc2022 cmd

To run a container in detached (background) mode and give it a name:

docker run -d --name myserver mcr.microsoft.com/windows/servercore:ltsc2022 ping -t localhost

Managing Running Containers and Images

List all currently running containers:

docker ps

List all containers including stopped ones:

docker ps -a

List all locally stored images:

docker images

Stop a running container by name or ID:

docker stop myserver

Remove a stopped container:

docker rm myserver

Remove an image from local storage:

docker rmi mcr.microsoft.com/windows/servercore:ltsc2022

View logs from a running or stopped container:

docker logs myserver

The containerd Runtime

Modern Docker on Windows Server 2022 uses containerd as the underlying container runtime. containerd is an industry-standard container runtime that manages the complete container lifecycle — image transfer and storage, container execution, and supervision. Docker Engine communicates with containerd via the containerd shim layer. You can interact with containerd directly using the ctr command-line tool that ships alongside it:

ctr version

To list images tracked by containerd (distinct from the Docker image cache):

ctr images list

The containerd service runs as a separate Windows service. You can verify its status:

Get-Service containerd

Both the docker and containerd services must be running for Docker containers to function. If you experience issues, check both service states before debugging further.

Restarting Docker After OS Updates

Windows Server 2022 receives cumulative updates through Windows Update. After applying updates that include kernel-level changes, you must restart the host server. Containers that were running at the time of the restart will stop. After reboot, the Docker and containerd services should restart automatically if configured with automatic startup. However, containers with a restart policy set to always or unless-stopped will restart automatically:

docker run -d --restart=always --name webserver mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2022

To update Docker itself to a newer version, re-run the Install-Package command with the -Force flag to overwrite the existing installation:

Install-Package -Name docker -ProviderName DockerMsftProvider -Force -RequiredVersion 24.0.7

After updating Docker, restart both services:

Restart-Service containerd
Restart-Service docker

Firewall Considerations

Docker on Windows Server creates a virtual network adapter for container networking. The default NAT network allows containers to communicate externally through the host’s network adapter. If you need to expose container ports to the external network, publish ports using the -p flag:

docker run -d -p 8080:80 --name iis mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2022

This maps port 8080 on the host to port 80 inside the container. Windows Firewall rules are automatically created by Docker for published ports, but if you are using a third-party firewall or additional Windows Firewall profiles, you may need to add rules manually:

New-NetFirewallRule -DisplayName "Docker Port 8080" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 8080

Conclusion

Installing Docker on Windows Server 2022 is straightforward via the DockerMsftProvider PowerShell module. With Docker and containerd running, you can pull Windows container images from the Microsoft Container Registry, run and manage containers using standard Docker CLI commands, and choose between process and Hyper-V isolation modes based on your security and density requirements. Windows Server 2022 provides a solid foundation for containerized Windows workloads, with strong support for the ltsc2022 base images and a modern containerd-based runtime stack.