Using recent podman (3.x) on 5.10.x Alpine Linux Kernels
apk add podman util-linux
enable and start the cgroups and podman services
rc-update add cgroups
rc-update add podman
rc-service cgroups start
rc-service podman start
edit /etc/subuid and /etc/subgid, add mappings starting at 200000 or greater
load needed kernel modules
modprobe tun
modprobe fuse
test it out
podman unshare cat /proc/self/uid_map
0 1024 1
1 200000 65536
If you get this error:
% podman ps -a
Error: cannot re-exec process to join the existing user namespace
Try removing or examing your ~/.xdg/runtime hierarchy. That fixed it for me after looking at lots of strace logs I was not able to explain why it was not working.
rc-server -> rc-service