Windows Server 2019 - Docker Daemon#

Installing Docker via OneGet Provider PowerShell Module#
Windows containers enable packaging applications with dependencies and leveraging operating system-level virtualization for fast, isolated environments. Here’s how to install Docker using the OneGet provider PowerShell module:
-
Install the OneGet PowerShell module:
Terminal window 1Install-Module -Name DockerMsftProvider -Repository PSGallery -Force -
Use OneGet to install the latest version of Docker:
Terminal window 1Install-Package -Name docker -ProviderName DockerMsftProvider -
After installation, reboot the computer:
Terminal window 1Restart-Computer -Force

Downloading Docker Manually#
For environments with restricted internet access, follow these steps to manually download and install Docker Engine - Enterprise:
-
Download the Docker installer archive on a machine with internet access:
Terminal window 1Invoke-WebRequest -UseBasicParsing -OutFile docker-19.03.3.zip https://download.docker.com/components/engine/windows-server/19.03/docker-19.03.3.zip -
Extract the archive, register, and start the Docker service:
Terminal window 1# Stop Docker service if an earlier version is installed2Stop-Service docker34# Extract the archive5Expand-Archive docker-19.03.3.zip -DestinationPath $Env:ProgramFiles -Force67# Clean up the zip file8Remove-Item -Force docker-19.03.3.zip910# Install Docker. This requires rebooting11$null = Install-WindowsFeature containers1213Restart-Computer -Force1415# Add Docker to the path for the current session16$env:path += ';$env:ProgramFiles\docker'1718# Optionally, modify PATH to persist across sessions19$newPath = '$env:ProgramFiles\docker;' + [Environment]::GetEnvironmentVariable('PATH',[EnvironmentVariableTarget]::Machine)20[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine)2122# Register the Docker daemon as a service23dockerd --register-service2425# Start the Docker service26Start-Service docker -
Test your Docker EE installation by running the hello-world container:
Terminal window 1docker pull hello-world:nanoserver2docker images3docker container run hello-world:nanoserver

This guide covers both automated installation via OneGet and manual installation for environments with restricted internet access.