Although Linux remains the easier and more efficient platform for most containers, Windows Server still plays a major role in many production environments. If your applications, tooling, or infrastructure tie you to Windows, mastering Docker on Windows Server becomes a practical requirement.
You might be working with Windows containers because:
- Legacy .NET Framework apps: Older ASP.NET MVC sites, WCF services, or Windows Services that can’t run in Linux containers.
- Your Application Has Windows-Specific Dependencies: Some applications are deeply woven into the Windows operating system. If your code calls on technologies like Microsoft Message Queue (MSMQ), COM+, relies on assemblies in the Global Assembly Cache (GAC), or interacts directly with the Windows Registry in complex ways, then you will need a Windows environment to function.
- Your Company Runs on Windows: Corporate policy and existing infrastructure are powerful forces. If all your servers are Windows-based, then your monitoring tools would be optimized for it, your security policies would be built around Active Directory, and your entire team’s expertise would lie in managing a Windows environment. In this scenario, introducing a few Linux servers adds significant operational overhead.
- You need a Windows CI/CD Build Agent: A Windows environment is required to build and package Windows applications. You cannot compile a WPF desktop application, run MSBuild for a full .NET solution, or create a Windows Installer (.msi) package on a Linux build agent. A containerized Windows build agent gives you a clean, repeatable, and isolated environment for every single build.
In this guide, we’ll explain how to install Docker on Windows Server. By the end of this article, you will be able to install it and run containers without any help.
If you’re using Windows Server only because Linux feels unfamiliar, you don’t need to avoid it. RunCloud provides an intuitive dashboard for managing fast and secure Linux servers without requiring complex command-line knowledge.
Explore How RunCloud Simplifies Linux Hosting →
Prerequisites and Requirements For Docker on Windows
A good DevOps engineer knows that a successful deployment is 90% preparation. Before you type a single installation command, verify that your environment is properly set up.
Section 1: System Requirements & Hypervisor Check
Check that you’re running a supported 64-bit Windows Server version (2016, 2019, or 2022). Then confirm CPU virtualization is enabled. How you check this depends on whether you are on bare metal or a virtual machine.
If Your Server is a Physical Machine:
You need to verify that virtualization support (often referred to as Intel VT-x or AMD-V) is enabled in the server’s BIOS or UEFI. The easiest way to check this from within Windows is to run a simple PowerShell command.
Open an elevated PowerShell prompt and run the following command:
systeminfo | findstr "Virtualization"Look at the output. You need to see Hyper-V – Virtualization Enabled in Firmware: Yes. If it says “No,” you must reboot the server, enter the BIOS/UEFI settings, and enable the feature.

If Your Server is a Virtual Machine (VM):
If your server runs inside a VM, you must enable nested virtualization on the host. Docker cannot run inside a VM without it.
This setting is not configured inside your Windows Server VM. You must configure it from the management interface of the host hypervisor that is running your VM.
- For VMware ESXi/vSphere: Shut down the VM. Edit the VM’s settings, expand the CPU section, and check the box for “Expose hardware-assisted virtualization to the guest OS.”
- For Microsoft Hyper-V: Shut down the VM. Open a PowerShell prompt on the Hyper-V host (not the guest VM) and run the command: Set-VMProcessor -VMName “Your-VM-Name” -ExposeVirtualizationExtensions $true.
Section 2: Install Latest Windows Updates
Unlike a simple application, the Docker Engine integrates deeply with the Windows kernel. Microsoft regularly releases critical bug fixes, performance improvements, and even new container features directly through Windows Updates. By skipping updates, you are likely to encounter strange bugs, networking issues, or outright installation failures that the Windows engineering teams have already resolved.
Prepare your server for a successful installation by getting it completely up to date.
- Open the Start Menu, type “Check for updates,” and open the System Settings panel.
- Click the “Check for updates” button and let Windows scan for all necessary updates.

- After the updates are installed, you will be prompted to restart your device. Do it. Rebooting your computer ensures that all changes are fully applied to the operating system before you proceed.
Section 3: Understanding Windows vs. Linux Containers
Windows Server can run both Windows and Linux containers, but you must choose the right one for your app. Pick Windows containers for .NET Framework or Windows-specific APIs. Use Linux containers for standard web stacks like NGINX, Node.js, Python, and databases.
When Should You Use Windows Containers?
These are native Windows containers. They run directly on your server, sharing the host’s Windows kernel, which makes them highly efficient and start quickly. Think of them as highly isolated Windows processes that have their own filesystem and registry, but fundamentally speak “Windows.”
- Common Base Images: When you build a Windows container, you’ll start from a base image provided by Microsoft, such as:
- Windows Server Core: This is the most common choice. It offers the best compatibility for older applications, as it includes a large subset of Windows APIs and services, such as IIS.
- Nano Server: This is an incredibly lightweight, stripped-down version of Windows. You use it for modern, self-contained .NET Core/5/6+ applications to create the smallest possible image size.
- When to use them: You must use a Windows container if your application is:
- Built on the .NET Framework (e.g., version 4.8 or earlier).
- An IIS-hosted website (ASP.NET, classic ASP).
- A Windows Service.
- Dependent on Windows-specific technologies like MSMQ, COM+, or the GAC.
When Should You Use Linux Containers?
When you want to run a standard Linux container (like one for NGINX, Python, or Node.js), Docker on Windows cleverly uses virtualization to run a tiny, purpose-built Linux virtual machine in the background. Your Linux containers run inside this hidden VM, not directly on the Windows kernel.
You should use a Linux container when your application is a standard Linux workload. This is perfect for:
- Web servers like NGINX or Apache.
- Applications written in Python, Node.js, Ruby, or Go.
- Databases like PostgreSQL, MySQL, or Redis.
- Essentially, any application you would normally find on Docker Hub that is not explicitly for Windows.
3. Installation Guide: Using PowerShell
To manage a Windows Server effectively, you need to embrace automation and scripting. For the entire installation, we will use PowerShell for all tasks. It’s repeatable, less prone to human error, and the professional way to configure your servers.
First, open PowerShell as an Administrator. You can do this by right-clicking the Start button and selecting “Windows PowerShell (Admin)” or “Windows Terminal (Admin)”.

Step 1: Enable Required Windows Features
Before you can install the Docker Engine, you must first enable the underlying features in the Windows operating system that support containerization and virtualization.
In your elevated PowerShell window, run the following commands one by one:
# Installs the core Windows Containers feature
Install-WindowsFeature -Name Containers
# Installs the Hyper-V role. This is best practice for security and compatibility.
Install-WindowsFeature -Name Hyper-V Even if you only plan to run Windows containers, installing the Hyper-V role enables “Hyper-V isolation.” This is a more secure way to run containers, as each one gets its own lightweight, dedicated kernel, preventing anything inside the container from affecting the host server.
Step 2: Install the Docker Engine on Windows
After your server has restarted, open another elevated PowerShell window. You will now use Microsoft’s DockerMsftProvider module to find and install the Docker Engine directly from a trusted repository.
Run these two commands:
# Installs the PowerShell module that knows how to find and install Docker
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
# Uses the module to install the latest validated version of Docker Engine
Install-Package -Name docker -ProviderName DockerMsftProviderYou will be asked to trust the repository; type A (for “Yes to All”) and press Enter to proceed.
Step 3: Post-Install Verification
Once your server is back online, it’s time to confirm that everything is working as expected. Open a new elevated PowerShell window and run these checks.
- Check the Docker Service: The Docker Engine runs as a Windows service. Run the following command to verify it. You should see the Status listed as Running.
Get-Service docker- Check the Docker CLI: Run the following command to verify that the docker command is available in your system’s PATH.
docker --versionThis should return the Docker version you just installed, for example: Docker version 20.10.9, build 79ea9d3.
- Get Detailed Information: The ‘docker info’ command provides a comprehensive overview of your installation.
docker infoPost-Installation Configuration
After installation, make Docker production-ready by adjusting these settings:
- Create the Config File: Create a file named daemon.json inside the
C:\ProgramData\docker\config\directory. You will need to create the config folder yourself if it does not exist. - Move the Docker Data Directory: To prevent filling your C: drive, add the following to your
daemon.json:"data-root": "D:\\Docker". This moves all images, volumes, and container data to the specified path on yourD:drive. - Set up a Registry Mirror: To speed up image pulls for docker pull, configure a local mirror. Add
"registry-mirrors": ["https://your.registry-mirror.url"]to prioritize pulling from your faster, local cache. - Grant Access to Non-Admins: To allow standard users to run Docker commands, add the following to the configuration:
"group": "docker". This gives members of the local Docker security group access to the Docker engine. - Set a Network Proxy: To use Docker behind a corporate proxy, you must set an environment variable. Use PowerShell to run
[Environment]::SetEnvironmentVariable("HTTP_PROXY", "http://user:pass@proxy:port/", [EnvironmentVariableTarget]::Machine).

- Run a Test Container: After configuring and restarting the Docker service, always confirm it’s working correctly. Run
docker run mcr.microsoft.com/windows/nanoserver:ltsc2022 powershell -Command "echo Hello from your configured container!"to verify it works correctly.
Suggested read: Self-Hosting Docker vs Cloud-Based Docker
After Action Report
Docker on Windows solves specific use cases, but most modern stacks run faster and more reliably on Linux. If you want that performance without managing Linux manually, RunCloud gives you a clean dashboard for deploying and managing Linux servers with ease.
With RunCloud, you get:
- Rock-Solid Security: RunCloud automates complex security configurations, so your server is hardened and protected from the start.
- Total Flexibility: It works with any cloud provider (e.g., AWS, DigitalOcean, Vultr) or even a server in your own home. You never get locked into a single provider.
- Complete Control: You always retain full root access and complete control of your server; RunCloud is your co-pilot, not a black box.
If you’re ready to run Docker with fewer constraints and better performance, try hosting your containers on a fast Linux server managed through RunCloud’s easy dashboard.
Create your free RunCloud account and deploy your next container the simple way.





