containers / podman-compose

a script to run docker-compose.yml using podman
GNU General Public License v2.0
5.09k stars 484 forks source link

Run single container as root, keep others rootless #785

Open Urhengulas opened 1 year ago

Urhengulas commented 1 year ago

Is your feature request related to a problem? Please describe. One of my containers needs root access, because it calls the perf_event_open syscall. Therefore it needs to be executed rootfull with sudo podman run (notice the sudo). Consequently it also needs to be executed as sudo podman-compose up. But if I understand it correctly that will put all the containers in root mode, while I just need it for one of them.

Describe the solution you'd like I'd like to specify the container to be put in root mode and keep the other containers rootless. I can imagine it either as an argument to podman-compose, e.g. podman-compose --root-mode container_name, or as a key in the compose.yml.

Describe alternatives you've considered Starting it with sudo podman-compose up works, but I'd prefer rootless as much as possible.

Maybe there is an option already, but I did not find one.

Additional context None

f1sle commented 3 weeks ago

Run it separately with sudo podman and start others with podman-compose?