Comment on Managing podman quadlets, users subids and such
glizzyguzzler@piefed.blahaj.zone 1 day ago
I approach it the same as I did with Docker, one user per container.
I started with rootless but networking within Podman is moot with multiple users per container. And one user for all containers to get networking has to lead to subUID clashes (and thus escape vectors) - unless someone can explain how not…
But root Podman is just as secure anyway, and easier, so I just roll with UserNS=auto and use idmap on the volumes to enable writing as the specified user for the container. And networking in Podman works because it’s one user space. By default UserNS=auto gives 1024 subUIDs to a container. I had to up that to 65534 or whatever the max is for Frigate to work. Every other container is cool with the default 1024. The subUIDs are pulled from a user named container that you need to enable for Podman root to work with UserNS, and it has like 2 million or something with their recommended setup, so it’s good.
It was containers:2147483647:2147483648 into subUID and subgid files
And I do have a fuckton of users; Debian once complained it ran out of numbers or something after like 20 users, so I just ran the first thing I found to make the UID limit some really big number, and I never thought about it again!
kanera@feddit.cl 1 day ago
excellent solution, just have root container to --user and use the auto userns, had no idea about that, sounds super convenient. Much more self contained, just let the program do its thing, I had no idea about userns=auto with root, tysm for ur input!! :)
glizzyguzzler@piefed.blahaj.zone 1 day ago
I added examples so you don’t have to dig as far if you want to give it a try!
kanera@feddit.cl 1 day ago
this is incredible thank you very much, I will read through this once I have more energy lmao, this looks like okay dense content, very interesting