Can I allow a 2nd Linux user manage my container? #20665
-
I am trying to create a container that is "owned" by at least 2 individuals. We both have different linux users on the same server/workstation, and I would like to allow my partner to manage/restart/exec-into my container. We've worked in a similar way on docker before, and we would like to switch to podman, for the obvious strong points(especially security). I've read https://www.redhat.com/sysadmin/rootless-podman-user-namespace-modes and https://www.redhat.com/sysadmin/supplemental-groups-podman-containers but still, the solution is not clear to me. We don't want to share the same linux user, for security reasons. The containerized app is written in C and relies on env vars as input. I want to allow my partner to restart the app, with different env values. When we ran it un-containerized(in the past), we had a 3rd user, and that was used exclusively to run this process/binary(with setuid) and to run The only idea I have is for both of us to configure podman to use the same, shared, storage directory. I don't know if that will work. Have you ever faced such a problem? Does podman have a solution to share management privileges over a user's (rootless) container? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I would suggest that you share the storage owned by a third user, then map that user into each owers container. Setup your /etc/subuild like usera 0:100000:999 userb 0:200000:999 Now run the same rootless container in usera and userb with the --user=1000 and the content on disk owned by UID=99999 |
Beta Was this translation helpful? Give feedback.
podman can be used in client server mode, a user can setup a podman service that could be used by other uses on the system (theoretically).
podman --remote ...
It would work similarly to docker, with the same security issues. Although you might be able to setup this entire environment to run rootless mode, so only one users account would be vulnerable as opposed to running containers as root.