Replacing Docker Desktop with Podman

Ever since Docker’s surprise announcement that they would begin charging business customers to use Docker Desktop, I’ve been looking for a suitable replacement to recommend to my development team and to use for my own personal projects. I don’t want to be in a scenario where I have to use one thing at work and a different thing at home to do the same thing. I value having the same tooling available no matter what I’m doing.

I did a little digging online and some local experimentation and what I found is that Podman is the best viable alternative to Docker Desktop right now, especially for those of us on Apple Silicon. With Podman, you can run both x86_64 and arm64 containers side by side with no issues, just like you can in Docker Desktop. This doesn’t work right out of the box, so I’ll explain the steps I took to get this working.

For these instructions, I’m assuming you have Homebrew installed.

The first thing to do is install Podman:

brew install podman

This will install an Apple Silicon (or Intel) native version of Podman. Setup isn’t quite done though, as if you try to run any containers right now you’ll get an error. You need to initialize your Podman virtual machine (which is run through qemu) and start it up:

podman machine init; podman machine start;

You’re now all set to run containers on Podman!

If you want to be fancy, you can add an alias to your zsh profile too:

alias docker=podman

This works because the Podman CLI is feature-compatible with Docker. It’s designed to be a drop-in replacement and in my experimentation I haven’t found a place this doesn’t work exactly like I’d want.

At this point, if you’re satisfied with running containers only for the architecture of the machine you’re on (arm64 on Apple Silicon and x86_64 on Intel) then you’re done! If you’re not, keep following along. There’s one more step we’ll need to take to make it so that you can run containers not built for your host platform:

podman machine ssh sudo rpm-ostree install qemu-user-static; podman machine ssh sudo systemctl reboot;

These two commands remote into the Podman VM1 and enable cross-platform qemu images. After the VM reboots (which should only take a few seconds) you can run images meant for any platform you like. As an example, I’m running the bitnami/mongodb image, which at the time of writing was only compatible with x86_64:

Check it out! We’re running an x86_64 on an M1 Mac. Pretty neat. And if we run an ARM container:

We get aarch64 (arm64) as our architecture. Very cool.

I hope this helps you replace Docker Desktop with a more sustainable tool. Podman is extremely powerful that has the full weight of Red Hat behind it, so I’m optimistic about where it will go in the future.

  1. Under the covers, Podman is running a Fedora VM. You can login to that VM with podman machine ssh to change configuration or install plugins. 

Arthur Rosa is an engineering manager based in Sunnyvale, California.