Earlier quoted context omitted.
Unprivileged LXCs? Interesting, I thought containers would require privileged LXC. At least, that it my takeaway from trying to run Podman in a nesting enabled, but unprivileged LXC under non-root user. I kept running into > newuidmap: write to uid_map failed: Operation not permitted I tried googling it, tried some of the solutions, but reached the conclusion that it's happening because the LXC is not privileged.
I once wrote a post about Docker in unprivileged LXC on ZFS [1]. The post is a little bit outdated, as it is much simpler today with ZFS 2.2.0, which is natively supported. There's also a more recent post that shows how to run rootless docker [2], with updated uid-mappings. Both may be helpful, have a look. The advantage of using LXC for me is resource consumption and separation of concerns. I have about 35 Docker co…
(dev) $ podman info
ERRO[0000] running `/usr/bin/newuidmap 3427 0 1000 1 1 100000 65536`: newuidmap: open of uid_map failed: Permission denied
Error: cannot set up namespace using "/usr/bin/newuidmap": exit status 1
I tried a solution I found on Red Hat's Customer Portal: (root) # setcap cap_setuid+ep /usr/bin/newuidmap
(root) # setcap cap_setgid+ep /usr/bin/newgidmap
Also did not work. I can run (root) # podman info
just fine as root. This leads me to believe there are some other problems with my non-root user permissions.EDIT: It probably makes little sense, to run rootless on top of an already unprivileged LXC. I just wanted to give vscode server it's own non-root user in there. Oh well...