How to Install Docker EE on Windows Server 2016 | Offline
Recently I was learning docker on Windows Server 2016 and I realized that official docker docs no longer have information for Docker EE on Windows Server 2016
Microsoft official documentation link for scripted installation of Docker EE is broken.
You can use following instructions to Install latest Docker EE on Windows Server 2016
Note: Use PowerShell as an administrator to run below commands
If you need to download a specific Docker Enterprise Engine release, all URLs can be found on this JSON index.
https://dockermsft.blob.core.windows.net/dockercontainer/DockerMsftIndex.json
Asof 31 Oct 2020, docker-19.03.12 is the latest release.
On an online machine, download the zip file.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12Invoke-WebRequest -OutFile docker-19.03.12.zip https://dockermsft.azureedge.net/dockercontainer/docker-19-03-12.zip
Copy this zip file to offline Windows Server 2016
Stop Docker service if earlier version of Docker is already installed
Stop-Service docker
Extract the archive.
Expand-Archive docker-19.03.12.zip -DestinationPath $Env:ProgramFiles -Force
Clean up the zip file.
Remove-Item -Force docker-19.03.12.zip
Install Docker. This requires rebooting.
$null = Install-WindowsFeature containersRestart-Computer -Force
Add Docker to the path for the current session.
$env:path += “;$env:ProgramFiles\docker”
Optionally, modify PATH to persist across sessions.
$newPath = "$env:ProgramFiles\docker;" +[Environment]::GetEnvironmentVariable("PATH",[EnvironmentVariableTarget]::Machine)[Environment]::SetEnvironmentVariable("PATH", $newPath,[EnvironmentVariableTarget]::Machine)
Register the Docker daemon as a service.
dockerd --register-service
Start the Docker service.
Start-Service docker
Check if docker is running fine
docker version
Pull Windows base images for Windows Server 2016 from local docker registry in your network or from Docker Hub (docker hub requires internet connection)
# servercore on windows server 2016
docker pull mcr.microsoft.com/windows/servercore:ltsc2016
# nanoserver on windows server 2016
docker pull mcr.microsoft.com/windows/nanoserver:sac2016
Now your machine is good to run Windows Containers.