-
Notifications
You must be signed in to change notification settings - Fork 111
Open
Description
Awesome project :) I'm trying to use rootlesskit directly, since I want isolation without necessarily image management, etc.
I'm trying to run it inside a docker container, with this Dockerfile:
FROM ubuntu:23.10
RUN apt update > /dev/null && apt install --yes rootlesskit
RUN useradd test-user
USER test-user
And I build this image, and run it with docker run -it --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined wat /bin/bash.
But rootlesskit just fails, with
test-user@a674e50fe5f3:/$ rootlesskit --debug bash
DEBU[0000] subid-source: using the dynamic source
DEBU[0000] Executing [/usr/bin/getsubids test-user]
DEBU[0000] Executing [/usr/bin/getsubids 1001]
DEBU[0000] reaper: auto chosen value: false
DEBU[0000] subid-source:dynamic: failed to get subuids by the UID 1001 error="failed to exec [/usr/bin/getsubids 1001]: exit status 1 (stdout=\"\", stderr=\"Error fetching ranges\\n\")"
DEBU[0000] Executing [/usr/bin/getsubids -g test-user]
DEBU[0000] Executing [/usr/bin/getsubids -g 1001]
DEBU[0000] subid-source:dynamic: failed to get subgids by the UID 1001 error="failed to exec [/usr/bin/getsubids -g 1001]: exit status 1 (stdout=\"\", stderr=\"Error fetching ranges\\n\")"
DEBU[0000] subuid ranges=[{165536 65536}]
DEBU[0000] subgid ranges=[{165536 65536}]
[rootlesskit:parent] error: failed to setup UID/GID map: newuidmap 14 [0 1001 1 1 165536 65536] failed: newuidmap: write to uid_map failed: Operation not permitted
: exit status 1
[rootlesskit:child ] error: parsing message from fd 3: EOF
/etc/subuid and /etc/subgid look fine:
ubuntu:100000:65536
test-user:165536:65536
Dropping the --privileged flag seems to have no effect either.
Metadata
Metadata
Assignees
Labels
No labels