Today we’re happy to announce the latest beta of Docker Engine and ecosystem support for Windows Server 2016 Technical Preview 5 released today by Microsoft.
Some of the improvements you’ll see include:
pullsupport for Windows images on Docker Hub
- Prototype multi-platform support for building, pushing and pulling Docker images that can run on multiple operating systems and CPU architectures (such as X86-64 and ARM)
- Greater stability and maturity
Docker is a platform that provides tools, APIs and formats for building, shipping and running apps of all kinds and Docker now supports containers based on the two most popular operating systems in use today: Linux and Windows. We’re excited that the power of Docker is becoming available to developers and sysadmins who develop and run code on Windows.
Docker Engine multi-platform support combined with Container-as-a-Service (CaaS) management software like Docker Universal Control Plane and Docker Trusted Registry means that Docker can help bridge the gap between “Linux” and “Windows” developer and ops teams by providing a shared framework to describe how apps are built, shipped and run.
Check out the Microsoft docs to setup a working Windows Server 2016 TP5 system either on Azure, in a VM (works with both Hyper-V on Windows and VirtualBox on OS X) or as a bare-metal install.
(Building and running Docker containers natively on Windows Server is currently a separate process from installing Docker for Windows or Docker Toolbox which set up a Desktop machines to run Docker Linux containers on a Windows).
Once setup, the most convenient approach is to use the Windows Server 2016 / Docker Engine combination remotely from a machine with development tools and editors installed (instead of trying to install them on Windows Server). This can be done by setting
DOCKER_HOST to reference the Windows Server host on the development machine. Check that everything is ready:
docker version Client: ... OS/Arch: windows/amd64 Server: ... OS/Arch: windows/amd64
Build a Docker image on Windows:
git clone https://github.com/docker-library/golang/ … cd golang git fetch origin pull/92/head:windows … git checkout windows docker build -f .\1.6\Dockerfile.windows -t golang:windows . Sending build context to Docker daemon 222.2 kB Step 1 : FROM windowsservercore ---> e1e5fb4dbc32 Step 2 : ENV GOLANG_VERSION 1.6.1 ---> Running in aa751abcc7d8 ---> 6af5118d053f Removing intermediate container aa751abcc7d8 Step 3 : ENV GOLANG_DOWNLOAD_URL "https://golang.org/dl/go$GOLANG_VERSION.windows-amd64.zip" ---> Running in 2b9b9f8f945c ---> d9097c90a49d ...
And run it:
docker run golang go version go version go1.6.1 windows/amd64
This should look familiar to Docker users on OS X or Linux and that commonality will enable developers and operators use Docker to seamlessly manage workloads on both Linux and Windows.
Docker Hub and Windows images
With today’s release, we’ve enabled full push-pull support of Docker images based on Windows Server on Docker Hub, including for private repos and organizations. Users can start sharing Docker images based on Windows Server with team-members and the wider community on Hub. This is the first step towards expanding the scope of content on Hub to new operating systems and CPU architectures, maintained both by the community and by Docker.
We’re looking forward to building on these efforts with the community so that Docker Hub will be a great place to get proven and secure Windows Server base images for popular programming languages and developer tools.
Docker is becoming available on more operating systems and CPU architectures, and we’re working on tools and APIs that let developers use Docker seamlessly in heterogeneous environments. The goal is for
docker pull golang (and similar) to fetch a Docker image built and optimized for whatever platform the Docker engine is currently running on, be that Linux or Windows on x86-64, ARM or System/390.
To accomplish this, the latest version of the Docker Image Manifest format supports manifest lists. These are lists of pointers to actual image manifests with metadata about the CPU architecture and operating system for each entry in the list. When doing
docker pull of a multi-platform image, the Docker registry will serve the manifest list and the engine then fetches the appropriate image for the system it’s running on.
As of today, Docker Hub has beta multi-platform support. Phil Estes has written an awesome tool for creating manifests lists from existing images, and for pushing the result to registries. Building on the golang example above, we can create a multi-platform golang image:
docker tag golang friism/golang:windows docker push friism/golang:windows …
Now, set up the manifest tool and create an input file to generate the manifest list (named
image: friism/golang:latest manifests: - image: golang:latest platform: architecture: amd64 os: linux - image: friism/golang:windows platform: architecture: amd64 os: windows
And run the tool:
manifest-tool.exe pushml friism-golang.yml …
On the next pull of
friism/golang, Docker Engine gets a list of two images and will choose what image to pull based on the
os attributes in the manifest list. Check out Phil’s detailed blog post on his prototype manifest tool.
Multi-platform is an important building block in making Docker a great tool for managing apps and services that run across different operating systems and hardware. Start experimenting with multi-platform images today using either a private registry or using Docker Hub. We’re looking forward to community and partner feedback. And we’re looking forward to improving multi-platform support in the coming months, including:
- Docker Hub UI for surfacing image platform support
- Search, both CLI and on Hub
- Docs and tools
- Docker Swarm and realizing the promise of heterogeneous Linux/Windows clusters demoed at last year’s DockerCon EU. Check out this lab guide for details.
To build and run your first Windows container, get Windows Server 2016 TP5 running, begin writing Dockerfiles for Windows, share images on Docker Hub and don’t hesitate to reach out with questions or feedback on the Docker Forums. For inspiration, check out Windows Dockerfiles authored by Stefan, Buc and Microsoft, and look through the Official Repos for candidates that could do with a good Windows version.
Docker and Microsoft have come a long way since the 2014 partnership announcement of the Windows Server port of Docker engine, through the first publicly available version, up to today’s release. This journey also saw John Howard from Microsoft join the ranks of core Docker maintainers. We’re proud of the progress we’ve made to empower developers and ops teams using Windows with Docker’s proven tools and APIs for building, shipping and running containers and that we can help bring together the Windows and Linux communities with a common toolset for shipping software.
Learn More about Docker
- New to Docker? Try our 10 min online tutorial
- Share images, automate builds, and more with a free Docker Hub account
- Read the Docker 1.11 Release Notes
- Subscribe to Docker Weekly
- Sign up for upcoming Docker Online Meetups
- Attend upcoming Docker Meetups
- Register for DockerCon 2016
- Watch DockerCon EU 2015 videos
- Start contributing to Docker