Sergey Nivens - Fotolia
When you want to use Docker in a Linux environment, it can be a challenge to choose a Linux distribution to host the open source platform. This is especially true because Docker can work on nearly every available Linux distribution. You can even deploy Docker containers from an Ubuntu desktop distribution. However, it's risky to deploy Docker containers from a desktop distribution because it usually doesn't have the hardened security of a server distribution. And with the added resource usage of the desktop, you'll have less CPU and RAM for the actual containers.
Let's explore some options to find the best Linux distribution for Docker for your enterprise.
First, ask yourself if you will dedicate the server to Docker containers. If a distribution will only serve up Docker containers, examine the Linux variants created for the specific purpose of deploying containers.
It's often beneficial to run container-specific distributions. These distributions, due to their stripped-down nature, provide enhanced stability. Universal package managers that use a transactional upgrade/rollback process, such as Snappy and Atomic, make container-specific distros easy to upgrade. Also, various isolation mechanisms offer high security. The following distributions are container-specific:
- CoreOS provides only the minimal functionality required to deploy containers.
- Red Hat Enterprise Linux Atomic Host removes all utilities and functionalities from RHEL that aren't necessary to run Docker containers and includes world-class support from Red Hat.
- Ubuntu Core, a very minimal take on Ubuntu, is designed for efficiency and offers the smallest runtime footprint. It claims the best security profile available.
- VMware Photon is a container-optimized cloud platform that includes developer tools, such as representational state transfer APIs, a command-line interface (CLI) and an HTML5 UI. Photon also offers on-demand access to Kubernetes clusters with high availability and automated scale-up/down.
- RancherOS goes so far as to containerize system services that are configured using cloud-init. It also uses Docker for management.
General questions to find the best Linux distribution for Docker
What if you know your best Linux distribution for Docker will need to function as more than just a means to deploy containers? It's possible that Linux could serve up containers, as well as VMs and Samba file shares. If that's the case, you need to find a Linux distribution that will serve those purposes and do it well.
You'll want to cast off any desktop-specific distributions, which will narrow down your search. To further refine your focus, hone in on three crucial points of interest: ease of use, security and support.
If your focus is ease of use, Ubuntu Server is the best Linux distribution for Docker. In less than 20 minutes, you can have a Linux server up and running that offers an incredibly shallow learning curve and does a great job working with Docker. However, the Ubuntu Server distribution is GUI-less, so if an all-CLI experience isn't for you, then it's not the right fit. You can purchase a support package for Ubuntu Server from the Ubuntu Advantage store. Since Docker is part of the standard repository for Ubuntu Server, installation is quick and easy. Ubuntu Server also works with Docker Enterprise Edition (EE). Docker EE simplifies provisioning and setup of Docker and offers Docker Certified, Image Management and Docker Datacenter, based on the purchased package.
If you work with a larger business or enterprise company, RHEL provides optimal support and security. As a more general Linux distribution for Docker, RHEL is a great option. The associated cost of RHEL is higher than that of Ubuntu Server, but it includes enterprise-grade support with the software purchase. RHEL also supports Docker EE for RHEL. The installation of Docker on RHEL is almost as easy as that of Ubuntu, but you will need to enable the Extras repository beforehand. However, you cannot install Docker EE from any standard repository.
SUSE Linux Enterprise Server (SLES) also works well with Docker EE and is the best fit for SUSE or openSUSE users. The benefits of Docker EE are the same on SLES as on either Ubuntu Server or RHEL, so this choice will come down to whether you are more familiar with the Red Hat system or the SUSE system. Like RHEL, the purchase of SLES includes enterprise-grade support. You cannot find Docker in the standard SLES repositories. To install, you must enable the Container Module 12 x86_64 repository. To install Docker EE, refer to the official Docker documentation.
What are popular Linux distros for servers?
Get Docker on Ubuntu 16.04
Other options to consider besides Docker