Docker Windows install instructions on the state of 4 August 2016
04 Aug 2016Configuration 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
- 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.
- Download latest
- 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)
- 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.GPO_name\Computer Configuration\Windows Settings\Security Settings\Account Policies\Password Policy
- Password must meet complexity requirements
- Using Local Security Policy - allow running Edge under Administrator.
- Under Local Policies/Security Options navigate to “User Account Control Admin Approval Mode for the Built-in Administrator account“
- Set the policy to Enabled
- Windows 10 Edge can’t be opened using the built-in administrator account
- Enable updates, Enable Insider Mode, Enable Developer Mode
- Install Hyper-V Feature
- Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
- Install Containers Feature
- Enable-WindowsOptionalFeature -Online -FeatureName containers -All
Set-ItemProperty -Path 'HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers' -Name VSmbDisableOplocks -Type DWord -Value 1 -Force
- Install Docker
New-Item -Type Directory -Path "C:\Program Files\docker\"
Invoke-WebRequest https://master.dockerproject.org/windows/amd64/dockerd.exe -OutFile $env:ProgramFiles\docker\dockerd.exe
Invoke-WebRequest https://master.dockerproject.org/windows/amd64/docker.exe -OutFile $env:ProgramFiles\docker\docker.exe
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$env:ProgramFiles\docker\", [EnvironmentVariableTarget]::Machine)
& $env:ProgramFiles\docker\dockerd.exe --register-service
- Configure Docker daemon
net localgroup docker /add
net localgroup docker Administrator /add
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"
`Start-Service Docker
- Check Docker
docker version
docker info
- Fetch Docker logs
Get-EventLog -LogName Application -Source Docker -After (Get-Date).AddMinutes(-5) | Sort-Object TimeGenerated
- Download default images depending on your host type (nano or gui)
Set-ExecutionPolicy Bypass -scope Process
Install-PackageProvider ContainerImage -Force
- 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) Restart-Service docker
docker tag microsoft/windowsservercore:10.0.14300.1030 windowsservercore:latest
- Deploy your first container
docker run -it windowsservercore ping -t localhost
- or:
docker run -it nanoserver ping -t localhost
- Docker machine install
- Install Chocolatey
& iex (wget 'https://chocolatey.org/install.ps1' -UseBasicParsing)
,rm $profile
choco install -y docker-machine
choco install -y docker-compose
Related Articles
- TechNet Evaluation Center Windows Server 2016 Technical Preview 5 Evaluations
- Different ways for installing Windows features on the command line
- How to Configure Network Settings on a Hyper-V Host in VMM
- Manage the Hyper-V Hosts - Set up a NAT network
- Run Hyper-V in a Virtual Machine with Nested Virtualization
- Containers Quick Start - Windows Containers on Windows Server
- Containers Quick Start - Windows Containers on Windows 10
- Docker on Windows - Docker Daemon on Windows