Which OS Is Best for Docker? Here’s How to Decide

What’s the best operating system for hosting Docker containers? That’s a loaded question. Here’s a guide to answering it.

The question is loaded because, well, people tend to have strong opinions about which operating system is “best” for any given task. That includes hosting containers.

Choosing a Docker Host OS

“Best” is in the eye of the beholder, of course. We can’t tell you which operating system is the absolute best for running Docker. But we can tell you which questions you should ask yourself as you try to figure out which system is the best fit for you.

Those questions include:

  • Does your system need to do more than just host Docker? If so, you’ll probably want a full-fledged Linux distribution, such as Ubuntu or Red Hat or SUSE. If you require only Docker functionality, though, you can save lots of overhead (and minimize potential cyberattack surfaces) by choosing a bare-bones Linux distribution capable of supporting Docker, such as Alpine Linux.
  • Do you want Docker to be baked in? If so, then choose a Linux distribution that comes with Docker preinstalled and configured for you, such as Project Atomic or RancherOS. Just keep in mind that a system that comes with Docker preconfigured means choices have been made by other people about which types of tools and options to include in the Docker stack. If you want to build your own stack from scratch, then choose a general-purpose Linux distribution and install Docker on it yourself.
  • Do you want to run on bare metal, virtual machines or in the cloud? In general, most operating systems can support Docker in any type of environment—which is good because your deployment needs are probably subject to change. But some platforms for hosting Docker—such as Amazon Container Service (ECS) and Google Container Engine (GKE)—can run only in the cloud. (Mind you, these are not really operating systems; they’re containers-as-a-service platforms.) And some operating systems are better supported in cloud-based virtual machine environments than others. You won’t find official images of obscure, minimalist Linux distributions on AWS or Azure, but you will find images for the big-name distributions, making it easier to install Docker on them inside one of these public clouds.
  • Do you want to host Docker on Windows? If the answer to this question is yes, then your choice of operating system is easy. Docker runs natively on Windows only on Windows Server 2016 and Windows 10, so you’ll have to use one of those. Use Windows Server if you want a server environment to host Docker in production, and use Windows 10 if you’re looking instead for a desktop system where you can test Docker locally.

Those are all the big questions you should ask yourself when figuring out which OS is best for hosting Docker. Just remember, again, that your mileage will always vary.

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

One thought on “Which OS Is Best for Docker? Here’s How to Decide

  • Currently debating between Ubuntu and “Alpine Linux”. Good information. Thanks, Christopher

Comments are closed.