Podman - Potential Alternative for Docker Desktop for Windows
Part 1: Overview – Docker Desktop - Potential Alternatives (Windows)
In this article I present Podman and report on my experiences regarding installation, operation, and whether the Minikube + Podman combo could banish Docker Desktop for Windows for me.
Podman
Podman is a rootless/daemonless container technology developed and provided by RedHat. In the next Ubuntu LTS, Podman will be a permanent part of the repositories, which should simplify installation somewhat.
I installed Podman V3.4.2 in a WSL2 container. The special thing about Podman is that it’s a complete CLI alternative for Docker CE. This means the commands stay the same, only podman is used instead of docker. It should also be mentioned that Podman, unlike Docker, can also be operated rootless – i.e. without root rights. I configured it as rootless, and I’ll describe the necessary steps for that below.
Podman in WSL
For the installation I followed this guide. It goes directly into VSCode and potential solutions for problems are also discussed. With this guide you then have a Podman rootless installation.
Deviating from this guide, I set my aliases in the .bash_aliases configuration:
alias docker=podman
What is also not mentioned in the guide is the container.config file. I copied it with
cp /etc/containers/containers.conf ~/.config/containers/containers.conf
to my home directory and then made the following changes:
Under [containers] the line with log_driver must be found and uncommented again. Make sure the entry looks like this:
[containers]
log_driver="k8s-file"
Directly under [engine] the group_manager should be set:
[engine]
cgroup_manager="cgroupfs"
Further down within the Engine category is the events_logger entry, this should be uncommented and look like this:
[engine]
events_logger = "file"
Additionally I added the following as the last command in .bashrc:
podman system renumber
After a sleep from the host or a restart of the host, I had problems with the running containers. Since WSL unfortunately doesn’t offer systemd, some problems are pre-programmed. With this command the pods are reordered at login with the user – this was the solution in my case for this error:
ERRO[0000] Error refreshing volume ...: error acquiring lock 1
Podman in Windows
Podman can now also be used under Windows with the wsl command and the -d (distribution) command.
The name can be found via wsl -l:
wsl -d PodmanHost podman info
For Windows 11 there is apparently an init/systemd-like system, you could approach this differently here. The Unix socket can be mounted so that a connection to WSL can be established via the Podman remote client – similar to Docker when CE is running somewhere else.
Podman + Remote Container in Visual Studio Code
Podman can then be integrated very easily in Visual Studio Code for Remote Containers. The settings should be adjusted as shown in the screenshot.
After that a devcontainer can be started as usual.
That was it, except for “Try a development container sample…” everything worked for me.
Conclusion
With setup, configuration, and potential problems, Podman in this configuration is not a solution for me. The basic functionalities of Docker Desktop for Windows can be replaced with the combination Minikube + Podman + WSL2, but I can’t say how long it will be before a new problem arises.
The choice between this solution and Docker Desktop for Windows for a fiver a month is very simple for me – I stick with Docker Desktop for Windows.
Had I not tried anything else, that would certainly have been the case, but I did try two more alternatives. Otherwise I will continue to experiment with Podman on Unix-like systems, the daemonless concept behind it is quite interesting.
Articles in this series:
- Part 1: Overview – Docker Desktop - Potential Alternatives (Windows)
- Part 2: Podman - Potential Alternative for Docker Desktop for Windows (you’re reading this)
- Part 3: Docker-CE + WSL2 - Potential Alternative for Docker Desktop for Windows
- Part 4: Rancher Desktop - Potential Alternative for Docker Desktop for Windows