@ g Ivan Prisyazhnyy on software engineering

Docker Windows install instructions on the state of 4 August 2016

Configuration of Windows 10 / Windows Server 2016 TP5 requires few specific steps to be done in order to make Docker work. This is detailed description of the setup sequence.

Another Solution

Prepared Windows Server 2016 TP5 with everything on-board image can be build with Packer using @StefanScherer’s github.com/docker-windows-box. Its possible to build VirtualBox, VMWare or Hyper-V image. Configuration scripts sits in https://github.com/StefanScherer/docker-windows-box/tree/master/scripts.

Step-by-step guide

  1. Hyper-V setup: In order to connect the VM to the internet configure: External virtual switch in Shared control mode. There is also an opportunity to use Internal switch with NAT enabled over.
    1. Run Hyper-V in a Virtual Machine with Nested Virtualization
  2. Download latest
  3. Windows 10 and install latest August 2, 2016 — KB3176929 (OS Build 14393.10). (https://support.microsoft.com/en-us/help/12387/windows-10-update-history)
  4. or: Windows Server 2016 TP5 from Insider program (min insiders build 14372) https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-technical-preview 1. Use Standard Key: MFY9F-XBN2F-TYFMP-CCV49-RMYVH from Preinstallation instructions in order to do basic install. 1. Default password policy requires to enter Administrator Password to contain: Big letters, Small letters, Digits.
    1. Using Local Security Policy - disable strict password policy.
    1. GPO_name\Computer Configuration\Windows Settings\Security Settings\Account Policies\Password Policy
    2. Password must meet complexity requirements
      1. Using Local Security Policy - allow running Edge under Administrator.
    3. Under Local Policies/Security Options navigate to “User Account Control Admin Approval Mode for the Built-in Administrator account“
    4. Set the policy to Enabled
    5. Windows 10 Edge can’t be opened using the built-in administrator account
  5. Enable updates, Enable Insider Mode, Enable Developer Mode
  6. Install Hyper-V Feature
  7. Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
  8. Install Containers Feature
  9. Enable-WindowsOptionalFeature -Online -FeatureName containers -All
  10. Set-ItemProperty -Path 'HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers' -Name VSmbDisableOplocks -Type DWord -Value 1 -Force
  11. Install Docker
  12. New-Item -Type Directory -Path "C:\Program Files\docker\"
  13. Invoke-WebRequest https://master.dockerproject.org/windows/amd64/dockerd.exe -OutFile $env:ProgramFiles\docker\dockerd.exe
  14. Invoke-WebRequest https://master.dockerproject.org/windows/amd64/docker.exe -OutFile $env:ProgramFiles\docker\docker.exe
  15. [Environment]::SetEnvironmentVariable("Path", $env:Path + ";$env:ProgramFiles\docker\", [EnvironmentVariableTarget]::Machine)
  16. & $env:ProgramFiles\docker\dockerd.exe --register-service
  17. Configure Docker daemon
  18. net localgroup docker /add
  19. net localgroup docker Administrator /add
  20. Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\docker -Name ImagePath -Value ""C:\Program Files\docker\dockerd.exe" --run-service -H npipe:// -H tcp://0.0.0.0:2375 -G docker -D"`
  21. Start-Service Docker
  22. Check Docker
  23. docker version
  24. docker info
  25. Fetch Docker logs
  26. Get-EventLog -LogName Application -Source Docker -After (Get-Date).AddMinutes(-5) | Sort-Object TimeGenerated
  27. Download default images depending on your host type (nano or gui)
  28. Set-ExecutionPolicy Bypass -scope Process
  29. Install-PackageProvider ContainerImage -Force
  30. Install image 1. Install-ContainerImage -Name WindowsServerCore (obsolete) 1. or: Install-ContainerImage -Name NanoServer (obsolete) 1. or: Start-BitsTransfer https://aka.ms/tp5/6b/docker/nanoserver -Destination nanoserver.tar.gz; docker load -i nanoserver.tar.gz (obsolete) 1. or: docker pull microsoft/nanoserver:10.0.14300.1030 (for Windows 10, Windows Server 2016 Nano) 1. or: docker pull microsoft/windowsservercore:10.0.14300.1030 (for Windows Server 2016)
  31. Restart-Service docker
  32. docker tag microsoft/windowsservercore:10.0.14300.1030 windowsservercore:latest
  33. Deploy your first container
  34. docker run -it windowsservercore ping -t localhost
  35. or: docker run -it nanoserver ping -t localhost
  36. Docker machine install
  37. Install Chocolatey & iex (wget 'https://chocolatey.org/install.ps1' -UseBasicParsing), rm $profile
  38. choco install -y docker-machine
  39. choco install -y docker-compose

Related Articles

Related Issues

blog comments powered by Disqus