1

I have a gluster volume mounted on a host machine and tried to run a namespaced docker container with a bind mount from the gluster mount on the host.

It seems that the user namespacing is not handled correct for the glusterfs bind mount. My problem is that the root user within the container is not allowed to change ownership of files within the bind mount or touch files that are owned by an other user.

Test setup

host# mount -t glusterfs glusterhost:/glustervol /mnt/gluster
host# docker run -it -v /mnt/gluster/test:/mnt/test alpine sh
container# touch /mnt/test/foo
container# chown nobody /mnt/test/foo
chown: /mnt/test/foo: Operation not permitted

container# chmod a+w /mnt/test
container# adduser -D test
container# su test
container$ touch /mnt/test/bar
container$ exit
container# touch /mnt/test/bar
touch: /mnt/test/bar: Permission denied

If I do the same with a docker bind mount from other than a gluster volume everything works as expected.

Is there a way to make docker with user namespace remapping work with glusterfs?

jojoob
  • 194
  • 6

0 Answers0