Install Windows Containers \ Docker On Windows Server 2016 Insider Build

In this article, I’ll show you how to Install Windows Containers \ Docker on Windows Server 2016 Insider Build.

Because Windows Server Insider Build Is new and the regular Installation method won’t work and we have to use the manual which takes extra few minutes.

Update:

You can use the two lines below to Install,  If it doesn’t work please use the next code:

Install-Module -Name DockerMsftProviderInsider -Repository PSGallery -Force
Install-Package -Name docker -ProviderName DockerMsftProviderInsider -RequiredVersion 17.06.0-ce

Once done restart the server.

Use the code below If the above code fails.

To Install docker run the cmdlets below.

$version = (Invoke-WebRequest -UseBasicParsing https://raw.githubusercontent.com/docker/docker/master/VERSION).Content.Trim()

Invoke-WebRequest "https://master.dockerproject.org/windows/x86_64/docker-$($version).zip" -OutFile "$env:TEMP\docker.zip" -UseBasicParsing

Expand-Archive -Path "$env:TEMP\docker.zip" -DestinationPath $env:ProgramFiles -Force

$env:path += ";$env:ProgramFiles\Docker"

$existingMachinePath = [Environment]::GetEnvironmentVariable("Path",[System.EnvironmentVariableTarget]::Machine)

[Environment]::SetEnvironmentVariable("Path", $existingMachinePath + ";$env:ProgramFiles\Docker", [EnvironmentVariableTarget]::Machine)

dockerd --register-service

Start-Service Docker

Once done,  you can start downloading the new Nano Server insider build.