News for hackers. Stuff that matters.
Re:Docker is dead? Podman – an alternative tool? by qbasic_forever on Saturday June 04, 2022 @04:00AM (#31618053)
Yeah in my experience with rootless you don't need to worry about UID shenanigans anymore. Containers can do stuff as root (from their perspective at least) all they want but any files you bind mount into the container are still just owned/modified by your user account on the host system (not a root user bleeding through from the container).
Re:Docker is dead? Podman – an alternative tool? by capableweb on Saturday June 04, 2022 @05:54AM (#31618630)
How does that work in practice? Podman is changing the permission bits of files that are synced between the host and the container?

If I create a file with certain permission bits in the container, I'd expect the file to be 100% identical when pulling it over to the host, but maybe that's just "legacy" thinking coming from my docker experience?

What about copying files directly between containers, would that change the permissions as well?

Re:Docker is dead? Podman – an alternative tool? by lapser on Saturday June 04, 2022 @06:30AM (#31618813)
The permissions (rwx) don't change, but the uid/gid is mapped. E.g. uid 0 is the running user outside the container, by uid 1 will be mapped to 100000 (configurable), and say 5000 inside the container is mapped to 105000. I don't remember the exact mapping but it works roughly like that.
Re:Docker is dead? Podman – an alternative tool? by sureglymop on Saturday June 04, 2022 @08:41AM (#31619633)
Oh, that sounds great! Thank you, that was the information i wanted.
Re:Docker is dead? Podman – an alternative tool? by coldtea on Saturday June 04, 2022 @06:21AM (#31618753)
>If I create a file with certain permission bits in the container, I'd expect the file to be 100% identical when pulling it over to the host

The permission bits are metadata on the fs, the file can still be identical.

Plus, how permissions on a file on the container be identical in the host, if e.g. the groups/users are different?