Installing a Windows Server 2016 VM with Docker on it

I use a Windows 10 laptop

First I download the iso :

https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-technical-preview

Then I tried to create a Windows 2016 VM using Virtual box but got no luck there (more exactly : no network connection on the server).

So then I tried Hyper V :

First you need to enable the Hyper-V feature in Windows (from that point, you cannot use VirtualBox anymore, so you need to disable Hyper-V to go back to VB)

I create a new VM in HyperV and declared the iso file as a boot device.

I create a brige (external) and connect the 2nd VM network interface to that bridge

I use a 60Gbs System disk.

Then I start the VM. The server installation takes time but causes no problem. Choose Custom Installation.

Tip : You need to use Right-CTRL for the mouse arrow to escape from the VM Window.

Tip : CTL-ALT-DEL has to be sent from the Action Menu of the VM Window

Then I add the Windows Container extension

Running the ps1 script without weird errors took me quite a while, not to mention a full reinstall of the VM with a non-GUI W2016.

eventually :

w16

In order to contact the docker daemon from the outside, I modified the settings so that the daemon listens to port 2375

Edit C:ProgramData\docker\runDockerDaemon.cmd (with notepad cause I have a minimal server config)

Replacing

docker daemon -D -b “Virtual Switch”

by

docker daemon -D -b “Virtual Switch” -H tcp://0.0.0.0:2375

restarting the docker service :

> restart-service docker

Guessing what the Windows Server IP adress is with “ipconfig /all”

Try to connect from a docker agent running on another host :

$ docker -H tcp://192.168.1.93:2375 info
Containers: 0
Images: 1
Storage Driver: windowsfilter
Windows:
Execution Driver: Windows 1854 1.9.0-dev 4376380
Kernel Version: 10.0 10514 (10514.0.amd64fre.th2_release.150808-1529)
Operating System: Windows Server 2016 Technical Preview 3
CPUs: 1

That works – Yippee !!

Tip : I had to unset the DOCKER_TLS_VERIFY variable first.

I can now add that Windows server to a Docker swarm server. But I won’t do it now cause my swarm server is currently on Gcloud.

Advertisements
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: