Last active 4 hours ago

Revision e6572ecd266abc5f8c0d3ec10693dd788e55266c

Podman_tricks.md Raw

Calculate new SUBUID range:

PREVIOUS="$(sort -t: -k2 -n /etc/subuid | tail -n1)" && PREVIOUS="${PREVIOUS#*:}" && echo "$PREVIOUS"
# ex.out: 165536:65536

FIRST="$((${PREVIOUS%:*}+${PREVIOUS#*:}))" && echo "$FIRST"
# ex.out: 231072

NEW=${FIRST}-$((${FIRST}+65535)) && echo "$NEW"
# ex.out: 231072-296607

Then use that range for the new podman user:

sudo usermod --add-subuids 231072-296607 --add-subgids 231072-296607 USERNAME

Propagate changes: podman system migrate
And validate as the new user: podman unshare cat /proc/self/uid_map