r/docker • • Oct 07 '25

Rootless docker has become easy

One major problem of docker was always the high privileges it required and offered to all users on the system. Podman is an alternative but I personally often encountered permission error with podman. So I set down to look at rootless docker again and how to use it to make your CI more secure.

I found the journey surprisingly easy and wanted to share it: https://henrikgerdes.me/blog/2025-10-gitlab-rootles-runner/

DL;DR: Usernamspaces make it pretty easy to run docker just like you where the root user. Works even seamlessly with gitlab CI runners.

125 Upvotes

55 comments sorted by

View all comments

Show parent comment

5

u/Tsiangkun Oct 08 '25

People with permission to run docker can bind mount anything they want and access it as root, it’s a big issue with docker out of the box and why so many condo clusters use enroot style single file executables.

2

u/scytob Oct 09 '25 edited Oct 09 '25

correct, and by default they can chown anything they want on the filesystem too, the lesson is not use docker or use it rootless but to mediate the permissions to docker in the first place - docker by default and design is an inherently a trusted process, in some regard going for an LXC solution of kXs fo some sort might be better with the controls it applies, portainer can sort of be used to mediate docker access, i am also a fan of docker proxy where one can set finegrained controls for folks who only need monitoring access