A 🌧️ Saturday.
This feels like a great day to uninstall Docker Desktop on my Mac, and try to go all-in Podman.
What is Podman?
" ... a daemonless container engine for developing, managing, and running OCI Containers ... "
Podman is an open source project and you can run containers as root, or as a non-privileged user. It supports the Docker API and can be used with tools like docker-compose.
What's wrong with docker?
Nothing, docker is a great tool! Free to use for Open Source. The Desktop app for Mac and Windows will continue to be free for small businesses, but require a license for bigger companies. For some time now, I have wanted to find out what the alternatives are to using docker.
Uninstalling docker
I ran docker system prune
to delete all existing containers and images.
Then I uninstalled the desktop client. By selecting the "Troubleshoot" menu option I found an uninstall button and pressed it.
It required some research (aka googling) to figure out how and where to find an uninstall option.
As you can see in the video, the docker app is still there even if the Desktop client was uninstalled. I just deleted that one, and then deleted the docker-related files and folders that were still in my file system:
Installing podman
I followed the official install guideline to install podman. In addition to that, also installed the Mac OS X specific helper tool to be able to run docker-compose. I learned that from the print-out displayed when the brew install command was completed.
I can now run containers with podman! Here I'm starting a ZooKeeper server running in a container:
podman run --rm -p 2181:2181 zookeeper
Where's my commands?
But wait, my 🧠 is already wired to use the docker command. Do I have to unlearn things? Podman is compatible with the docker commands already, but you can also create an alias:
alias docker=podman
It is now possible to use the docker command as before!
Installing docker-compose
By installing the podman-mac-helper tool as described before in this post, it is possible to use podman with docker-compose.
You might wonder: didn't I uninstall all docker related things? 🤔
Yes, but the docker-compose tool is available to install separately & you'll find it on Homebrew. 🍻
brew install docker-compose
Quirks & workarounds
When trying all of this out, the podman command worked well for building and running containers. However, I got an error when running the docker-compose up
command. That's kind of a dealbreaker, isn't it?
The error:
listing workers for Build: failed to list workers: Unavailable: connection error: desc = "transport: Error while dialing unable to upgrade to h2c, received 404"
As I understand it (from this conversation on Github), there is something not working as expected when using the latest version(s) of docker-compose and podman.
Luckily, there is a simple workaround to use until the bug is fixed. Prefixing the docker-compose command to disable the buildkit API that is causing the bug. Doing this will make things work very well.
That's it! 👋
Top photo by frank mckenna on Unsplash