익명 10:31

Mount podman socket into container rootless-to-rootless

Mount podman socket into container rootless-to-rootless

podman 4.9.3 on Ubuntu 22

I previously used docker with zero additional configuration in this way:

docker run --interactive --name test-suites --tty --volume=/var/run/docker.sock:/var/run/docker.sock test-suites

Each test suite then used the docker CLI to start its desired application containers to test - and break - however desired. Easy.

Now I am trying to migrate to podman and this does not work out-of-the-box, but worse, the documentation is all over the place and I cannot figure it out.

Here are some invocations I have pieced together:

podman run --interactive --name=test-suites --tty --volume=/run/user/"$(id --user)"/podman/podman.sock:/run/podman/podman.sock test-suites
podman run --interactive --name=test-suites --security-opt label:disable --tty --volume=/run/user/"$(id --user)"/podman/podman.sock:/run/podman/podman.sock test-suites
podman run --interactive --name=test-suites --security-opt label:type:container_runtime_t --tty --volume=/run/user/"$(id --user)"/podman/podman.sock:/run/podman/podman.sock test-suites
volume_podman_socket=/run/user/"$(id --user)"/podman/podman.sock:/run/user/"$(id --user)"/podman/podman.sock
set -e
podman system service --time 0 & # start podman socket if not yet running
podman build --tag test-suites --file execute-test-suites.dockerfile ../..
podman run --interactive --name=test-suites --security-opt label:type:container_runtime_t --tty --userns=keep-id --volume="$volume_podman_socket" test-suites

All fail with the exact same error:

Error: unable to copy from source <base image>: writing blob: adding layer with blob "<sha>"/""/"<sha>": unpacking failed (error: exit status 1; output: potentially insufficient UIDs or GIDs available in user namespace (requested 0:5 for /usr/bin/write): Check /etc/subuid and /etc/subgid if configured locally and run "podman system migrate": lchown /usr/bin/write: invalid argument)

podman system migrate terminated instantly with status code 0 and no messages... and changed nothing.

My /etc/subuid and /etc/subgid both contain an entry <username>:100000:65536, which ought to suffice, if truly only 5 were needed!?

I can mount regular directories just fine.

How do I fix this? What is the real error!?

Sources I tried to follow:



Top Answer/Comment:

Comment: I am a bit wary of this blob "<sha>"/""/"<sha>" output: It looks as if something had to be missing between the two shas, inbetween the two middle quotes. But I have not found anything about that, so I can only hope it is okay?

상단 광고의 [X] 버튼을 누르면 내용이 보입니다