rootless podman in rootless podman なら動く(Ubuntu 22.04)。
ただし、ホストに書き込むには podman unshare
を使ってコンテナ内のユーザー用にパーミッションを変更する必要がある。
$ echo $UID:$GID
1000:1000
$ podman unshare chown 1000:1000 -R $PWD
$ podman run -it --rm --user podman --device /dev/fuse -v $PWD:/workdir:Z -w /workdir quay.io/podman/stable bash
[podman@328a1796e173 workdir]$ podman run -it --rm -v $PWD:/workdir:Z -w /workdir alpine sh
...
/workdir # touch aaa.txt
/workdir # ls -l
total 0
-rw-r--r-- 1 root root 0 Jul 14 02:49 aaa.txt
/workdir # exit
[podman@328a1796e173 workdir]$ exit
$ ls -l
合計 0
-rw-r--r-- 1 100999 100999 0 7月 14 11:49 aaa.txt
rootful podman in rootless podman は動かない…