By now, we've all seen the posts and tweets from the IT blogosphere, heralding the arrival of Docker for Windows. Now, to be clear: the ecosystem of Docker tools for Windows is nothing new. Tools such as Boot2Docker, Kitematic, and the Docker Client for Windows have been around for a while, and their collective functionality for Windows has recently been rolled up into Docker Toolbox. While these tools don’t really provide the full, native Docker experience on Windows, they do provide:

Until very recently, it was not possible to use a Windows Server platform to host the Docker Engine without adding an additional layer of virtualization. That all changed with the recent release of Windows Server 2016 TP3, which provides a bona-fide Docker daemon running natively on an actual Windows Server host. To many, this is the long awaited missing piece that clears the path to using Docker containers, tools, and workflows in production Windows environments.

Docker Engine for Windows Server requires Windows Server 2016, which is currently only in the Technical Preview 3 release stage. Like most bleeding-edge projects, Docker Engine for Windows Server is still very much in the skunkworks phase. The current set of official documentation is sparse, fragmented, and a bit elusive. In this walkthrough, we will outline the end-to-end steps required to quickly get up and running Docker Engine for Windows Server, from host OS install through your first docker run command.

Go ahead and skip to the Walkthrough: section below, but circle back here during progress bar breaks to read these key points about Docker Engine for Windows Server, gleaned from the Windows Server team at DockerCon:

Walkthrough: Getting Started with Docker Engine for Windows Server

Install Windows Server 2016 TP3 (Core)

  1. Download the .iso for Windows Server 2016 TP3. This requires registration for a TechNet account as well as additional registration for the evaluation download. Only the .iso is required, you do not need to download the .wim file.

  2. Before installing, note the following install options:

    Bare metal: create bootable DVD/USB and complete a bare metal install.

    VM: create a 64-bit virtual machine in VirtualBox/HyperV/vmWare/etc. For this walkthrough, we will be using vmWare ESXi.

    Cloud instance: At this time, AWS EC2 does not offer an AMI for Windows Server 2016 TP3 with Windows Server Containers, however (of course) Azure does. YMMV on other cloud platforms.

  3. According to Microsoft, the full (GUI) installation of Windows Server does not support containers at this point in time, and they recommend only installing Windows Server Core. However, I have tested this install on both Full /Core, and Docker seemed to work as expected in both versions. For this walkthrough, we will use Windows Server Core.

  4. Using the .iso downloaded in step 1 above, proceed to install Windows Server 2016 TP3, click “Install now” when prompted.

  5. To install Windows Server Core, choose “Windows Server 2016 Technical Preview 3”, not “Windows Server 2016 Technical Preview 3 (Server with Desktop Experience)”, click "Next".

  6. Accept the license agreement, click Next.

  7. Choose “Custom”

  8. Configure your partitions, accept any dialogues about Windows Partitions, choose the largest partition created, and click “install”.

  9. When the install is complete, the system will reboot.

  10. After reboot, you will be prompted to change the Administrator password. Ensure “Ok” is selected, press Enter, provide and confirm a password, press Enter twice.

  11. Windows will briefly set up the system for first use, and you will be presented with a command prompt. Installation of Windows Server 2016 TP3 (Core) is complete.

Setup Windows Server host for Containers

  1. At the command prompt, do powershell.exe
  2. Ensure console window looks like this:

  3. If it does not (still in the powershell window) do: start-process powershell -Verb runas

  4. Do wget -uri http://aka.ms/setupcontainers -OutFile C:\ContainerSetup.ps1

  5. Do C:\ContainerSetup.ps1

  6. OS will reboot, install some features, and prompt to unlock with credentials.

  7. Provide the credentials created earlier. As soon as you login, a PowerShell session will spawn and the setup will continue.

  8. During the setup process, a very large .wim file will be downloaded. This takes a long time (~45 minutes for me), and does not provide any console feedback to indicate the progress. Don’t worry, your box is not locked up.

  9. At the end of the download, the setup process will resume.

  10. The setup will indicate Installing Docker… followed by Script complete!, and present you with a prompt in the PowerShell console.

Do Docker stuff

  1. Do docker version to confirm both the client and server components were installed successfully.

  2. The Technical Preview of Docker for Windows Server isn’t feature complete yet (and taking into account that the feature sets will never be exactly identical given the differences of the underlying platforms), most of the Docker commands you already know will work as expected on Windows Server. Here’s what it thinks it can do, anyway, I’ve tested a great deal of this without any issues:

  3. Let’s kick the tires.

    docker images

    This lists the two default Windows docker images available on the machine:

    docker run -it --name dockerdemo windowsservercore cmd

    Now you are in a Windows Server Core container (specified by windowsservercore), the container is named dockerdemo, and you are using an interactive terminal (specfied by -it and cmd), all running on a real Windows Server Core Docker host!

Where to go from here?