How to Run Docker Containers on Windows Server

To run Docker containers on Windows Server, install a Windows container runtime, pull an image built for a compatible Windows release, and start it with docker run. The steps below use Microsoft’s documented Moby (Docker CE) setup script and Docker CLI. Many older tutorials use DockerMsftProvider; the Microsoft quick-start now documents a different, script-based setup path.

Choose a runtime before installing

Microsoft’s Windows Server container guide lists Moby (Docker CE), Mirantis Container Runtime (MCR), and containerd as runtime options. Moby provides the familiar Docker command line used here. For a vendor-supported production runtime, Microsoft’s on-premises support guidance recommends MCR; check the current Mirantis compatibility matrix, licensing, and support terms before installing it. Microsoft’s Windows container setup guide explains the options.

Docker Desktop is not supported on Windows Server. Native Windows Server containers run Windows images; they cannot run Linux images directly because containers share the host kernel. If your workload needs Linux containers, use a Linux host or a Linux virtual machine. Microsoft says Linux Containers on Windows Server (LCOW) is deprecated, and Docker Desktop is not supported on server editions. See Microsoft’s Windows Server support policy and Docker’s Windows installation guidance.

1. Check the Windows Server host

Sign in with an account that can install Windows features, then open PowerShell as Administrator. Record the server release and build so you can choose a matching container image later:

Get-CimInstance Win32_OperatingSystem | Select Caption, Version, BuildNumber
Administrator PowerShell command for checking the Windows Server release and build
Check the host version before selecting a Windows container image tag.

Keep the host patched. If the server is a Hyper-V virtual machine and you plan to run Hyper-V-isolated containers, the VM needs nested virtualization; process-isolated containers do not use that additional Hyper-V layer. See Microsoft’s Windows container host requirements before choosing an isolation mode.

2. Download Microsoft’s Docker CE installer

Microsoft’s current quick-start uses a PowerShell script from its Windows-Containers repository. In the elevated PowerShell window, download the script:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-DockerCE/install-docker-ce.ps1" -OutFile install-docker-ce.ps1
PowerShell command downloading Microsoft’s Windows-Containers Docker CE installation script

For a managed server, follow your organization’s script-review process before running downloaded code. The official setup page identifies this script as the Moby/Docker CE installation method and says it enables the container-related operating-system features as well as installs the runtime.

3. Install the runtime

Run the downloaded script from the directory where it was saved:

.install-docker-ce.ps1

Allow the setup to finish and follow any restart prompt. The script configures the Windows container host and installs Docker Engine components. If PowerShell blocks the script because of your organization’s execution policy, use your approved software-deployment process rather than changing machine-wide policy.

Administrator PowerShell running the Docker CE setup script on Windows Server
Run the installer in an elevated PowerShell session and complete any requested restart.

4. Confirm Docker Engine is available

After installation—and after restarting if prompted—sign back in and check the service and client-to-daemon connection:

Get-Service docker
docker version
docker info

Get-Service should report the Docker service as running. In docker version, confirm that both the Client and Server sections appear. If the Server section is missing, check the service state and whether the setup still needs a reboot.

PowerShell checks for the Docker Engine service and Docker client and server sections
A running service and both Docker version sections indicate that the CLI can reach the engine.

5. Match the image tag to the host

Windows container images are tied more closely to host OS versions than typical Linux images. Start with the corresponding Long-Term Servicing Channel (LTSC) tag:

Windows Server hostServer Core image tag
Windows Server 2025ltsc2025
Windows Server 2022ltsc2022
Windows Server 2019ltsc2019

Matching the host and image release is the safest starting point. Microsoft’s Windows container compatibility table covers exceptions and isolation behavior. Use images from a trusted registry, and check the image publisher’s instructions for application-specific requirements.

Windows Server 2019, 2022, and 2025 matched with their corresponding LTSC container image tags

6. Pull and run a test container

For a Windows Server 2022 host, pull Microsoft’s Server Core image with the matching tag. Substitute ltsc2025 or ltsc2019 when using those host releases:

docker pull mcr.microsoft.com/windows/servercore:ltsc2022
PowerShell command pulling Microsoft’s Windows Server Core LTSC 2022 container image

Run a one-time command to verify that the image can start. The --rm option removes this test container when the command exits:

docker run --rm mcr.microsoft.com/windows/servercore:ltsc2022 cmd /c echo Hello from a Windows container

You should see the text printed in PowerShell. The image remains cached locally, while the temporary container is removed.

PowerShell running a one-shot Server Core container and displaying its echo output

7. Start and manage an application container

For an application image, follow its publisher’s run instructions and replace YOUR_IMAGE with the complete image name and tag. This example starts a background container named webapp and maps host port 8080 to container port 80; use those ports only if the application listens on port 80:

docker run -d --name webapp -p 8080:80 YOUR_IMAGE

Then inspect and clean up the container as needed:

docker ps
docker ps -a
docker logs webapp
docker stop webapp
docker rm webapp
PowerShell commands for listing containers, reading webapp logs, stopping it, and removing it

docker ps shows running containers, while docker ps -a also lists stopped ones. Removing a container does not remove its image. If the application stores data that must survive container replacement, configure a Docker volume or bind mount using the image’s documentation, and allow the mapped host port through Windows Firewall only when external access is intended.

Common startup problems

  • Image fails with a version error: confirm the host release and image LTSC tag, then consult Microsoft’s compatibility table. Hyper-V isolation can help with some supported version combinations, but it requires the Hyper-V role and, in a VM, nested virtualization.
  • The Docker server is unreachable: check Get-Service docker, start or restart the service if appropriate, and complete any pending host restart.
  • Image pull fails: verify the registry name and tag, outbound access to Microsoft Container Registry, and any proxy or firewall rules. A Linux image requires a Linux runtime on a Linux host or VM.

For runtime selection, image servicing, and host support details, use the linked Microsoft and Mirantis documentation because supported versions and installation guidance can change.

Leave a Comment

How to Check Hard Drive Health in Windows Server

How to Check Hard Drive Health in Windows Server

Check Windows Server disk status and reliability counters, verify SMART data when available, and separate hardware warnings from NTFS errors.

How to Add and Delete Users in Windows Server

How to Add and Delete Users in Windows Server

Create, grant admin rights to, disable, or remove local Windows Server users with Computer Management or PowerShell. Learn when to use Active Directory instead.

Set Up the Serviio Media Server on Windows Server

Set Up the Serviio Media Server on Windows Server

Install Serviio on Windows Server, share local or NAS media folders, and test DLNA playback. Learn how to check the Windows service, firewall, and Pro-only browser features.

How to Convert PNG, JPG, or BMP Images to ICO in Windows

How to Convert PNG, JPG, or BMP Images to ICO in Windows

Convert PNG, JPG, or BMP files to Windows ICO with GIMP. Prepare a square image, keep transparency when needed, add standard sizes, and check the export.

How to Clear Cache in Windows 8: A Step-by-Step Guide

How to Clear Cache in Windows 8: A Step-by-Step Guide

Clear thumbnail, DNS, Internet Explorer, Microsoft Store, Search, and Live Tile data with Windows 8’s built-in tools, and learn what each cleanup removes.

How to Remove Item Check Boxes in Windows 10 File Explorer

How to Remove Item Check Boxes in Windows 10 File Explorer

Turn off Windows 10 item check boxes in File Explorer with the View ribbon, or use Folder Options if the toggle is missing. See what changes and how to select multiple files without boxes.

Set Up VMware Workstation Pro on Windows Server

Set Up VMware Workstation Pro on Windows Server

Install VMware Workstation Pro on a compatible Windows Server host, from checking support and downloading the right build to creating your first VM.

How to Read Linux Partitions on Windows Without Formatting Them

How to Read Linux Partitions on Windows Without Formatting Them

Browse and copy Ext2, Ext3, or Ext4 files on Windows with a read-only workflow. See what Linux Reader’s free edition supports and when WSL fits.

How to Run Caddy as a Web Server on Windows Server

How to Run Caddy as a Web Server on Windows Server

Install Caddy’s native Windows binary, serve a test site, enable automatic HTTPS for a domain, and run Caddy as a Windows Server service.

How to Run Linux Docker Containers on Windows Server with Hyper-V

How to Run Linux Docker Containers on Windows Server with Hyper-V

Run Linux Docker containers alongside Windows Server by creating an Ubuntu Hyper-V VM, installing Docker Engine, and publishing a test service safely.