Skip to content

Instantly share code, notes, and snippets.

@vadikgo
Last active October 15, 2016 16:03
Show Gist options
  • Save vadikgo/f6cea2af12d4c0a103cf87a813f5ee79 to your computer and use it in GitHub Desktop.
Save vadikgo/f6cea2af12d4c0a103cf87a813f5ee79 to your computer and use it in GitHub Desktop.

Install docker to Windows 2016

Full manual here (https://msdn.microsoft.com/en-us/virtualization/windowscontainers/docker/configure_docker_daemon?f=255&MSPPError=-2147217396)

  1. Install Container Feature and reboot
Install-WindowsFeature containers
Restart-Computer -Force
  1. Install docker service (get latest from https://master.dockerproject.org)
Invoke-WebRequest "http://10.116.99.190/files/docker/docker-windows-1.12.zip" -OutFile "$env:TEMP\docker.zip" -UseBasicParsing
Expand-Archive -Path "$env:TEMP\docker.zip" -DestinationPath $env:ProgramFiles
$env:path += ";c:\program files\docker"
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\Docker", [EnvironmentVariableTarget]::Machine)
  1. Open firewall port 2375
netsh advfirewall firewall add rule name="docker engine" dir=in action=allow protocol=TCP localport=2375
  1. Configure Docker daemon to listen on both pipe and TCP (replaces docker --register-service invocation above)
dockerd.exe -H npipe:////./pipe/docker_engine -H 0.0.0.0:2375 --register-service
  1. Start service
Start-Service docker
  1. Load windows nano server image
Invoke-WebRequest "http://10.116.99.190/files/docker/nanoserver.tar.zip" -OutFile "$env:TEMP\nanoserver.tar.zip" -UseBasicParsing
Expand-Archive -Path "$env:TEMP\nanoserver.tar.zip" -DestinationPath "$env:TEMP"
iex "docker load -i $env:TEMP\nanoserver.tar"
  1. List images and start container
docker images
docker run -it microsoft/nanoserver powershell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment