Install Docker on Windows Server 2025 Tutorial
This guide will assist you in setting up a Docker engine on Windows Server 2025 for running Windows-based containers.
This guide is also compatible with Windows Server 2022 and previous versions.
Things to Know Before Installing Docker on Windows Server
- Docker on Windows Server is designed to run Windows-based containers only.
- You cannot run Linux containers on the Windows Server Docker engine.
If you need to run Linux containers on your Windows Server, the solution is to create an Ubuntu virtual machine and install Docker within that VM.
Also This guide is specific to Windows Server. If you're using Windows 11, there's a separate solution called Docker Desktop, which allows you to run both Windows and Linux containers.
How to Install Docker on Windows 11Demo: Install Docker on Windows Server
Microsoft provides an installation script to install Docker on Windows Server. What you need to do is open a terminal (PowerShell) as an administrator, download the script, and run it in PowerShell.
To download the script, run the following command:
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-DockerCE/install-docker-ce.ps1" -o install-docker-ce.ps1
After downloading the script, run it to install the Docker engine:
.\install-docker-ce.ps1
During the installation, Windows Server will reboot once. After the reboot, the installation will continue automatically.
After the installation is finished, you can check the Docker version installed on your server by running the following command:
docker version
To verify that the Docker engine is working correctly, run a "hello-world" container using the following command:
docker run hello-world
If you see the message "Hello from Docker!", that means the Docker engine is working properly.
Running Windows Containers
Remember, you can only run Windows containers on the Docker engine for Windows Server.
You can find Windows-based images in the official Microsoft repository on the Docker Hub page.
What Next?
Now that you have Docker Engine up and running on your Windows Server, check out our video tutorial on how to start containers using the docker run command.