So Windows 10 Anniversary is out and it brings with it Containers!
Most likely if you’re like me and already interested in docker, you’ll have installed the Docker App from docker.io and will be wondering why the instructions don’t work.
Basically the docker app for windows doesn’t currently support Windows containers.
If you run docker version you can see why:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
> docker version Client: Version: 1.12.0 API version: 1.24 Go version: go1.6.3 Git commit: 8eab29e Built: Thu Jul 28 21:15:28 2016 OS/Arch: windows/amd64 Server: Version: 1.12.0 API version: 1.24 Go version: go1.6.3 Git commit: 8eab29e Built: Thu Jul 28 21:15:28 2016 OS/Arch: linux/amd64 |
The server is running linux. No hosting Windows containers in that.
Now I could uninstall the current docker app and then follow the instructions, but really I want to just quickly try out docker windows containers but also keep using my linux containers.
How I got it working was to tweak the instructions a bit:
- From the System Tray, right-click on docker and select “Exit Docker”
- In powershell stop the docker service Stop-Service com.docker.service
- Download the Windows container service (ensure you have a c:\temp folder):
1Invoke-WebRequest "https://get.docker.com/builds/Windows/x86_64/docker-1.12.0.zip" -OutFile "c:\temp\docker-1.12.0.zip" -UseBasicParsing - CD into the c:\temp folder and extract this archive:
1Expand-Archive -Path "docker-1.12.0.zip" - There are 3 files in the new “docker” folder: docker.exe (which is the same as in the Windows docker app), docker-proxy and dockerd.exe. We need dockerd.exe
- Register this new dockerd service and start it:
12./dockerd.exe --register-serviceStart-Service docker - Once you start the new docker service you’ll see:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
> docker version Client: Version: 1.12.0 API version: 1.24 Go version: go1.6.3 Git commit: 8eab29e Built: Thu Jul 28 23:54:00 2016 OS/Arch: windows/amd64 Server: Version: 1.12.0 API version: 1.24 Go version: go1.6.3 Git commit: 8eab29e Built: Thu Jul 28 23:54:00 2016 |
Now your windows nanoserver container will happily install and as per the original instructions:
1 2 3 |
docker load -i nanoserver.tar.gz docker tag microsoft/nanoserver:10.0.14300.1030 nanoserver:latest docker run -it nanoserver cmd |
Unfortunately for me, it just hangs here, and does absolutely nothing. In the end I have to kill the docker.exe process and stop the service.
So still waiting on getting working containers on Windows.
To remove the Windows container service, and return to linux, stop the windows container service (optionally un-register it)
1 2 |
Stop-Service docker ./dockerd.exe --unregister-service |
Then start the Docker app service again, the run “Docker for Windows” app again to start the Mobylinux host.
1 |
Start-Service com.docker.service |
Resolved
Update to the latest version:
1 2 |
Invoke-WebRequest https://master.dockerproject.org/windows/amd64/dockerd.exe -OutFile dockerd.exe Invoke-WebRequest https://master.dockerproject.org/windows/amd64/docker.exe -OutFile docker.exe |