Follow the instructions from Microsoft: Prep Windows operating system containers | Microsoft Docs
Quote:To install Docker on Windows Server, you can use a OneGet provider PowerShell module published by Microsoft called the DockerMicrosoftProvider. This provider enables the containers feature in Windows and installs the Docker engine and client. Here's how:
Open an elevated PowerShell session and install the Docker-Microsoft PackageManagement Provider from the PowerShell Gallery.
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
If you're prompted to install the NuGet provider, type Y to install it as well.
If you get an error opening the PowerShell gallery, you may need to set the TLS version used by the PowerShell client to TLS 1.2. To do this, run the following command:
# Set the TLS version used by the PowerShell client to TLS 1.2.
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;
Use the PackageManagement PowerShell module to install the latest version of Docker.
Install-Package -Name docker -ProviderName DockerMsftProvider
When PowerShell asks you whether to trust the package source 'DockerDefault', type A to continue the installation.
After the installation completes, restart the computer.
If you want to update Docker later:
Check the installed version using the following command:
Get-Package -Name Docker -ProviderName DockerMsftProvider
Find the current version using the following command:
Find-Package -Name Docker -ProviderName DockerMsftProvider
When you're ready to upgrade, run the following command:
Install-Package -Name Docker -ProviderName DockerMsftProvider -Update -Force
Finally, run the following command to start Docker: