Using Podman as a Docker Desktop alternative using Vagrant

Podman

So the tech world went a little crazy today, as usual ignoring more consequential problems happening in the world. Docker posted a notice saying that its Mac and Windows desktop clients will no longer be free for anybody other than individuals and small companies.

Here is The Register:

Docker will restrict use of the free version of its Docker Desktop utility to individuals or small businesses, and has introduced a new more expensive subscription, as it searches for a sustainable business model.

The company has renamed its Free plan to “Personal” and now requires that businesses with 250 or more employees, or higher than $10m in annual revenue, must use a paid subscription if they require Docker Desktop.

This gave me an excuse to try out something which I had been meaning to do for a while - use Podman as a replacement for Docker desktop on my Mac.

I found an article by Dave Meurer to replace Docker with Podman on the desktop. It uses Vagrant (with Virtualbox as the provider) to easily create a VM, and then install Podman on it, with a few scripts taking care of some niggles of operating Podman as a non-root user.

The steps were pretty detailed and complete, but there were couple of enhancements that I wanted to make:

  1. I definitely wanted to convert the raw shell script provisioning to Ansible, my favorite provisioning tool. It just gives me more confidence in iteratively develop the right steps to provision the image.
  2. I wanted to use private docker image repositories. Like most corporations, our Docker images are stored in a private (often Artifactory) image registry.

After a few hours of reading a bunch of man pages of containers.conf, registries.conf, etc. again and again, I finally found my sweet spot.

The code is here: https://github.com/sandipb/vagrant-setups/tree/main/podman

Just check it out and follow the instructions, and within a few minutes, you will be able to alias docker to podman and have a Docker Desktop-less alternative, in case you need it.

techcontainers
Notes on the httprouter Golang library Installing a specific version of a Homebrew Formula

Comments

comments powered by Disqus