Sergey Nivens - Fotolia


Everything you need to know about Docker and Windows Server 2016

Docker and Windows are now compatible, but there's more work to do before they will provide everything a developer needs. Expert Christopher Tozzi breaks down the issues.

Docker containers are not just for Linux anymore. In September, Docker announced that its open source application...

container platform will now support Windows Server 2016.

Wondering how Docker and Windows work, what the limitations are and whether it makes sense for your organization? This article's for you.

Docker and Windows: A complicated history

Docker's relationship with Windows is a little complicated, so let's first make clear how Docker for Windows has evolved over the past year or so.

Originally, as you probably know if you are familiar with Docker at all, Docker containers ran only on Linux systems. That's because Docker worked initially as an extension of LXC, a container framework that was integrated with the Linux kernel.

The plot thickened when Docker announced the availability of Docker apps for Windows and Mac OS X. Docker described these apps as being "native" to their respective operating systems. That terminology was confusing, however, because Docker for Windows and OS X relied on a Linux-based virtual machine to run.

So, when Docker promised "native" apps to Windows and OS X users, what it actually meant was that it was providing packages that would automatically set up a Docker environment via a Linux virtual machine on Windows or OS X. The solution was not actually native to those systems in the sense of being integrated into their underlying kernels. The apps didn't do anything that users couldn't already achieve by creating a virtual machine on their systems, installing a Linux guest in it and hosting Docker inside the guest. The Docker packages for Windows and OS X just automated this process.

But wait, there's more. In September 2016, Docker took the momentous step of unveiling truly native support for containers on Windows. In this offering, there is no virtual machine involved. The containers work using containerization "primitives" that are built into the Windows kernel, making it possible for Windows to host container environments without Linux entering the picture.

Sorry, Mac fans. Docker does not yet offer truly native support for your operating system of choice. And when I asked a Docker executive in September whether such support was on its way, his response -- while not ruling out the idea -- did not suggest that Docker would run natively on OS X anytime soon.

Docker and Windows: Advantages and limitations

Truly native Docker for Windows is a big deal. It opens a door for Docker to enter a whole new ecosystem -- an ecosystem based on Windows. Now, software development teams who want to make their apps available as containers for deployment on Windows servers can finally do so.

However, there are some important drawbacks that users should understand before experimenting with Docker for Windows. Those limitations include:

  • For now, only Windows Server 2016 and Windows 10 are supported. Docker won't truly work natively with earlier versions of Windows. (You can still run Docker inside a Linux-based virtual machine on other Windows versions, however.)
  • Docker for Windows can only be used to Dockerize Windows apps. Unlike a traditional virtual machine, Docker containers don't emulate an entire operating system; they just extend the functionality of the host operating system. As a result, you can only run Windows apps inside Docker containers if your Docker host is Windows -- just as you can only run Linux apps inside Docker containers on Linux.
  • Advanced networking features for containers don't yet work on Windows. That's because Docker and Microsoft are still working on implementing support for full container networking in the Windows kernel.
  • You can't (really) run desktop apps. Docker for Windows is a solution for server environments, and it's hard to imagine that changing. The main reason why is that Docker containers can't host apps that require a graphical user interface very well (unless the interface is delivered via a web browser). Theoretically, there are ways to do video for a Docker container, but they are not Windows-friendly (sorry, X11 on Windows fans), and they are certainly not production ready. So don't expect Docker to become the new way of installing desktop apps on your Windows PC anytime soon.

The future of Docker for Windows

The limitations outlined above mean that, for now, the only realistic use case for Docker and Windows is to test Docker for Windows. In other words, if you develop a Windows app and would like to experiment with Dockerizing it, grab yourself a Windows 10 desktop or a Windows 10 server and get to work. But don't expect to start using Docker in production on Windows in the immediate future.

For this to change, Docker will need to support more versions of Windows. At a minimum, Windows Server 2012 support would be important. In 2015, Windows Server 2003 was still reportedly powering a majority of businesses, meaning it will probably be a long while before Windows Server 2016 accumulates enough market share to make Docker on Windows a realistic proposition for many organizations.

Docker and Microsoft will also have to complete work on container networking for Windows in order for Docker to be truly production ready on the platform. Plus, the Docker ecosystem, which for now remains very Linux-centric, will need to expand so that third-party container management and monitoring solutions work with Windows hosts, too.
When all of this happens, however, Docker and Windows will provide developers and admins with a whole new way of deploying apps to Windows-based cloud infrastructure. That's a big deal for an open source container platform that is barely three years old and that was tightly entwined with Linux at its birth.

Next Steps

The complete primer on Windows Server 2016

Here's what you need to know about containers and Azure

More advice on getting started with Windows Server 2016 and containers

Dig Deeper on Managed Kubernetes and container services