An Overview of Docker Desktop Alternatives

Sep 1, 2021

It's been a few years since I was a maintainer of minikube, but after the news that Docker Desktop will no longer be free for enterprises and some of the misconceptions of how the technology works, I thought I'd write a post.

First, Docker Desktop is a great product, and the tradeoff between implementing an alternative system or paying for my team to use Docker Desktop is a no-brainer. Is it really worth your team's time to deal with an alternative stack? For what its worth, I'm no longer working on low-level container projects, so I use Docker Desktop in my daily workflow.

I've spent a lot of time with the internals of running Docker or Kubernetes on the desktop. In my 3 years at Google, I built and maintained minikube, which runs Docker and Kubernetes on macOS, Linux, and Windows (and many other container projects). So I'll review that first.

Minikube

Minikube is the officially supported way to run Kubernetes locally on macOS, Windows, or Linux. Furthermore, it is the only tool that is a drop-in replacement for Docker Desktop if you're running Kubernetes and Docker. There's an option to run just Docker with minikube if you'd like. The architecture is simple, but "turtles all the way down". Docker is built on Linux namespaces and cgroups, so all solutions on macOS or Windows utilize fast and native hypervisor frameworks to run a small Linux virtual machine.

Minikube napkin architecture on macOS or Windows. At a high level, Docker Desktop works the same way (with additional features for the filesystem, GUI, etc.)

Minikube does not come with a GUI, but it is open-source. I suggest minikube as a starting place for platform teams that are building a one-click solution thats tailored to their developer teams. It's configurable in pretty much every way – using different container runtimes, using a custom virtual machine image, support for GPU and other hardware passthrough. It runs on macOS through the Hypervisor.framework, Windows through Hyper-V, and Linux either natively (without a virtual machine), docker, or KVM. You can also use virtualbox to run the machine.

You can install it through most package managers (brew, chocolately, arch linux).

Podman

Podman is another CLI tool that provides a Docker-compatible API. It is open-source and published by Red Hat. On macOS or Windows, it requires you to provide a Linux virtual machine to run podman inside, although it provides some utilities to help you create this machine (see tutorial). On macOS that requires installing and running qemu.

Podman does not ship with a GUI. It does not run Docker, but rather a Docker API-compatible replacement. One benefit of this is that podman's architecture is daemonless, which means it does not run a long-running program to monitor and interact with the containers. In practice, daemon vs. daemonless does not show any real performance improvements (especially on macOS/Windows, where the real performance tank is running the virtual machine more than anything else).

If you are running podman in development but running Docker in production, you might be exposing yourself to some bugs or unintended behavior. This also means that you don't get new features like BuildKit, which promise faster and better container builds (see my Alternative to the Dockerfile).

Colima

A project that runs on Linux and macOS that spins up a docker environment in a virtual machine using Lima. Volume mounts may be faster with Lima, but the project is still in early stage development and may introduce breaking changes according to the README. Colima doesn't ship with a GUI and has a UX similar to minikube. Promising technology if you're willing to be on the cutting edge.

K3s

A stripped-down Kubernetes distribution that is much smaller and faster than a full upstream Kubernetes. This is how minikube used to work, although now it uses upstream. Staying current with upstream Kubernetes (and Docker) required lots of maintenance and patches. A few CPU cycles isn't worth the headache of debugging where the SQLite backend (k3s) differs from etcd (minikube).

Linux only. Not a replacement for Docker Desktop.

microk8s

A minikube-type program that runs on Ubuntu and uses snapd. On macOS and Windows, requires Multipass. No GUI, but provides a Kubernetes cluster and Docker daemon. A good alternative to Docker Desktop if you're already on Ubuntu or use Ubuntu in production. Open-source. Compared with minikube, both podman and microk8s are controlled by for-profit companies, rather than the CNCF/Linux Foundation. Maybe that's important for you – maybe you already have a support contract with those companies.

microk8s runs a conformant, but not upstream version of Kubernetes. You run into similar issues that k3s has – performance in exchange for the possibilities of heisenbugs.

Kind

Kind runs Kubernetes-in-docker, so it really isn't a replace for Docker, much less Docker Desktop. It's focused on running Kubernetes and requires a Docker installation. Open-source.

Buildah

A utility for building docker images. I've spent a lot of time in this area, and built many tools that ship OCI-compatible images that run on Docker. Doesn't actually provide a container runtime. Linux only.

BuildKit

A project by Docker that focuses on building and running Docker images in a faster and more extensible way. The tool is already baked into Docker Desktop (set DOCKER_BUILDKIT=1), but also comes as a standalone tool. Not really a replacement for Docker Desktop, but a replacement for Docker on Linux since it provides its own CLI tool and uses Moby (open-source Docker backend). Still needs to be run inside a virtual machine (does not provide utilities to help with that) if on macOS or Windows.


In closing, I still think there isn't a great replacement for Docker Desktop. If you don't care about the GUI, there's minikube, microk8s, and podman. If you don't care about building a virtual machine manager and maintaining the infrastructure around your developer platform's OS, there's many more options. If you're just looking for Docker and nothing else, you can still use many of the Kubernetes-native tools with Kubernetes disabled.

Comments? See the Hacker News Thread or reach out on Twitter.

More like this: