Environment Parity: Why Docker Matters More for Linux than Windows

Docker runs on any Linux distribution, but only on select versions of Windows. That begs the question: Is Docker as useful on Windows as it is on Linux?

Docker and the Environment Parity Problem on Linux

To understand my point, you first have to recognize that one of Docker’s chief selling points is that it lets you take an app and run it in a predictable way across a variety of different types of host operating systems. In Linux-based environments, this is very useful.

Why? Because Docker runs on any modern version of Linux, and there are hundreds of Linux distributions (Wikipedia has just a partial list here). Plus, each Linux distribution can be configured in different ways, and often are available in multiple versions.

As a result, in the Linux world, operating system environments vary widely. This variability has traditionally made it challenging to install and run Linux applications within data centers or clouds that involved more than one kind of Linux.

For example, if you had both Ubuntu and Red Hat Enterprise Linux servers, you’d have to install your app in a different way on each type of server because Ubuntu uses Debian packages, whereas Red Hat uses RPMs. (There are ways to convert between package formats, but it is difficult and not always smooth.)

Plus, once your application is installed, it might not behave differently on Ubuntu and Red Hat because the operating systems have different components, run different services and so on. The only way to avoid unexpected behavior would be to test your app on both Ubuntu and Red Hat before deploying it. That would take a long time, especially if you are dealing with multiple releases of Ubuntu and Red Hat.

Docker allows you to avoid this issue. When you package your app as a Docker container, you can install it on Ubuntu, Red Hat or any other type of Linux distribution by downloading the container image.

In addition, because the container abstracts the app away from the host operating system, you can set environment variables within the container and enjoy predictable app behavior regardless of how the host environment is set up. As a result, testing your app on a multitude of host servers is not necessary.

So, on Linux, Docker solves a big problem. It provides environment parity in Linux-based data centers where parity is hard to come by.

Docker on Windows

On Windows, environment parity is not as big a deal. There are only a handful of Windows versions that are currently in widespread use. New Windows releases appear less frequently than new versions of Linux distributions.

To be sure, environment parity is still somewhat of a challenge on Windows. Even if all of your servers run the same version of Windows, there could be configuration differences between them.

Still, at the end of the day there is much less variability in Windows environments than there is in typical Linux-based infrastructure.

As a result, running Docker on Windows is arguably not as beneficial as running Docker on Linux.

Of course, Docker’s benefits are not limited to environment parity between different host operating systems. Docker also provides benefits such as faster app deployment, environment consistency between development and production and modularity in application deployment.

So Docker on Windows is certainly useful. But in one key respect, it is not as useful as Docker containers on Linux.

Christopher Tozzi

Christopher Tozzi has covered technology and business news for nearly a decade, specializing in open source, containers, big data, networking and security. He is currently Senior Editor and DevOps Analyst with Fixate.io and Sweetcode.io.

Christopher Tozzi has 254 posts and counting. See all posts by Christopher Tozzi