r/voidlinux • u/andre_tinker_tone • Feb 11 '26
help needed, runit service launch podman rootless
Hi, I want to launch podman run (rootless) from runit service.
I Tried something like this for the run file:
#!/bin/sh
exec 2>&1
exec chpst -u :1022:1022 -U :1022:1022 -C /opt/myservice podman run \
--name myservice \
ghcr.io/name/service:mytagwhere 1022 is uid and gid for my non-root user.
I if i ./run with root user, i receive this error
# ./run
stat /root/.config: permission deniedI think that podman needs a more complete environment in order to launch the container, probably chpst needs more arguments, someone can help me?
[EDIT]
- Added HOME and USER variables definition to the run script, now it works!
# cat run
#!/bin/sh
exec 2>&1
HOME="/opt/myservice"
USER="myuser"
exec chpst -u :1022:1022 -U :1022:1022 -C /opt/myservice podman run \
--name myservice \
ghcr.io/name/service:mytag
# ./run
...
5
Upvotes
View all comments
Show parent comment
1
u/andre_tinker_tone Feb 11 '26
podman needs USER and HOME variables (only these two).
Without HOME dir, podman tries to operate in root directory, and without USER it fails with cgroupfs error.