How to Install Docker on Windows Server 2019

This article shows how to install Docker on Windows Server 2019 to run Docker Container by referring to the Microsoft web page, prepping Virtualization.

Enable Hyper-V Feature on OS

In order to run Windows Containers, the “Hyper-V” Windows Role should be enabled on Server OS

If Hyper-V nested, you may see an error when enabling Hyper-V. You may try the following command line from VM Host.

Set-VMProcessor -VMName VMName -ExposeVirtualizationExtensions $true

Reboot Server after the wizard completed.

Install DockerMsftProvider PS Module

To install Docker on Windows Server 2019, you can use a PowerShell module published by Microsoft called the DockerMicrosoftProvider. This provider enables the containers in Windows and installs the Docker engine.

Install-Module -Name DockerMsftProvider -Repository PSGallery -Force

Run:

Install Docker Package

Now, install the package and reboot.

Install-Package -Name docker -ProviderName DockerMsftProvider

Run:

After rebooting, check Service to see if Docker Engine is running.

Now, OS is ready for you to run Docker Container.

Container Examples can be found in the articles below.

How to run IIS on Windows Server Container on AWS

How to run IIS Container using Docker Desktop on Windows 10

Leave a Comment