-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update Dockerfile, with Giuseppe's newuidmap #23
Conversation
$ id -u
1001
$ unshare -rmn mount -t sysfs none /sys
(success) $ docker run --rm --user 1000 --privileged ubuntu:18.04 unshare -rmn mount -t sysfs none /sys
(success) $ docker run --rm --user 1000 --security-opt seccomp=unconfined --security-opt apparmor=unconfined --cap-add all --net=host ubuntu:18.04 unshare -rmn mount -t sysfs none /sys
mount: /sys: permission denied. |
Uh, read-only mount on $ docker run -it --privileged --rm --entrypoint bash rootless-containers/rootlesskit:test
user@5ffda338c480:/$ unshare -rmn mount -t sysfs none /sys; echo $?
0
user@5ffda338c480:/$ sudo mount -o remount,ro /sys
user@5ffda338c480:/$ unshare -rmn mount -t sysfs none /sys; echo $?
mount: /sys: permission denied.
32
user@5ffda338c480:/$ mkdir /tmp/sys2
user@5ffda338c480:/$ unshare -rmn mount -t sysfs none /tmp/sys2; echo $?
mount: /tmp/sys2: permission denied.
32
user@5ffda338c480:/$ echo 'why :('
why :( |
I think the error happens because of: https://github.com/torvalds/linux/blob/master/fs/namespace.c#L3326-L3328 It should be fine to mount another
|
Thanks, but it seems we still need to unmount /sys/firmware as the root in the container... |
yes, there must already be a fully visible |
Yes, this is quite similar to the other (This is a somewhat odd restriction for |
updated PR. |
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
EDIT: waiting for docker/cli#1347 to be merged
Signed-off-by: Akihiro Suda suda.akihiro@lab.ntt.co.jp
With shadow-maint/shadow#132 , we should no longer need
--privileged
for running RootlessKit inside Docker containers.