rootlesskit icon indicating copy to clipboard operation
rootlesskit copied to clipboard

Install of RPM package fails - /proc: cpio: chown

Open dg424 opened this issue 4 years ago • 0 comments

Hi,

Is there a reason that chmod on /proc does not work under rootless ? It works fine on standard Docker (i.e. non-privileged mode). We're using rootless to primarily disable the use of --privileged. Was hoping that the rest of Docker functionality would remain the same.

Test:

$ docker run --rm -d --privileged --name dind -e DOCKER_TLS_CERTDIR="" -p 2375:2375 docker:dind-rootless /usr/local/bin/dockerd-entrypoint.sh --tls=false
b631b1ccac4dfed8b8ff3c4a85230fac123e166a1a14bc8af7a7ad9e2c19fad4
$ export DOCKER_HOST=127.0.0.1:2375
$ docker run --rm -it centos:7 bash
Unable to find image 'centos:7' locally
7: Pulling from library/centos
2d473b07cdd5: Pull complete 
Digest: sha256:9d4bcbbb213dfd745b58be38b13b996ebb5ac315fe75711bd618426a630e0987
Status: Downloaded newer image for centos:7
[root@533070923f65 /]# chmod 777 /proc
chmod: changing permissions of '/proc': Operation not permitted

Ok, now try with the host Docker daemon, no privileged mode or anything special:

$ unset DOCKER_HOST
$ docker run --rm -it centos:7 bash
[root@24697768a1a7 /]# chmod 777 /proc
[root@24697768a1a7 /]# <--- no error, works

dg424 avatar Nov 16 '21 21:11 dg424