Hi, everyone. Recently, I was watching Brodie Robertson’s video about Omarchy where he briefly mentioned that adding your Linux user to the docker group is a security issue. I then instantly paused the video and jumped to my computer. Because I did exactly that 🤦.
Removing myself from the docker group was easy. Just run
sudo usermod -rG docker $USER
and log out or restart.
But then I had the same issue that led me to adding my user to the docker group in the first place. Not being able to run docker commands as a normal user. That’s because docker’s daemon runs as root on Linux.
I heard that you can enable user namespace remapping (userns-remap) for docker, and was about to google how to do just that. But then I remembered something. There is another runtime for running containers, one that runs as a user daemon — Podman.
I removed docker from my system and installed podman from Arch repositories. I also installed podman-docker to emulate docker cli to better adjust to the state of things. After a quick reboot, I was completely on the podman train.
There was an issue though, even though I enabled podman daemon with
systemctl --user enable podman.service
My containers still didn’t start automatically with the whole system. Podman doesn’t do that by default. I had to also enable podman-restart service with the following command.
systemctl --user enable podman-restart.service
And with that, my transition is now complete.
There were some issues with permissions on volumes but nothing that quick chown -R can’t fix.
After all of that, I would absolutely recommend you migrating to podman.
Dan, signing out.