My 5 favorite Linux container images
When you start using containers in earnest, you quickly realize that there are many container images out there. One of open source's greatest strengths is choice, and with so many images available, you have plenty of options when you need an image to base your work upon. I find myself going back to the same few images pretty frequently. There are five in particular that consistently make me a happy fledgling cloud architect.
I've been running Nginx on servers for over a decade now, usually for its easy config file format and ability to do pretty good load balancing. Migrating to Kubernetes to run services has made me love Nginx even more, though, as I see how versatile it is as a reverse proxy, ingress controller, and of course, lightweight web server.
The Bitnami Nginx image on Quay.io is what I usually default to when I need a quick and reliable Nginx instance. It's easy to use with Podman and easy to install with Helm. It's well documented, so I always know where to look for essential configuration options.
Back when I was building custom applications for my users, I developed the habit of basing my work on the previous Red Hat Enterprise Linux (RHEL) release from whatever was current. It turned out that basing work you wanted to be "universal" on a stable distribution like RHEL was a safe practice. Everything I built ran on Fedora and Debian and other workstations, as well as my personal Slackware workstation.
From that experience, I've inherited the habit of basing most work I do on a nice, clean RHEL install. For work in the cloud, I use the official RHEL image.
[ Learn more about Linux by registering for this free online course: RHEL technical overview ]
There are a lot of great apps out there being delivered in containers. Anyone who's had to string several containers together to get an application working knows that the components you're using really matter. As I move my online services into the cloud, I've found that having a reliable container base for important dependencies makes deploying software easy. In fact, of all the images I use, the PostgreSQL container on Quay.io is the one that best helped me grasp the advantage of containers.
I already have plenty of variables when I'm setting up applications in the cloud, so knowing that the runtime for my database is solid is a huge advantage for me. I could configure an operating system and Postgres in a container to safely and reliably handle my applications' data, but with this image, many Postgres experts have already done that for me. That's an advantage I'll gladly accept.
On the cloud, it's just as useful as it is on the desktop (or mobile, or TV, router, drone, and such). The BusyBox image from the OpenShift project is tiny, so it's quick to pull. It's a minimal image, so it's easy to use, but it's been built with support for multiple architectures, including x64, Arm64, PPC, s390, and more, so it's suitable for whatever cloud you're on.
The one I build myself
I didn't get into Linux because I wanted to force my workflow into somebody else's solution. The first software I ever built on Linux was the kernel (I'd built other software on Unix previously), and my goal then was to get bzImage as small as possible. I got it down to 1.5MB and was awfully proud of it, even though it didn't actually boot (it turns out I'd forgotten to include the filesystem driver).
Continuing in that fine tradition, sometimes the best image is the one you build yourself. Chris Collins demonstrates exactly how to do this in his article How to build tiny container images. More importantly, he explains the logic behind the most significant choices. ("If we specialize enough and abandon the idea of troubleshooting inside of production containers, do we need Bash?")
Take a lesson from the best, and give it a go!
[ Build application environments for reliability, productivity, and change. Download the free eBook Cloud-native meets hybrid cloud: A strategy guide. ]
These three images aren't the only containers I use. There's that RHEL 8/PostgreSQL 13 one I get a lot of use out of, and an Etcd one that comes up a lot, and many, many more. I find it helpful to get familiar with a few reliable go-to container images, so explore your favorite image repositories and see what's out there.