How to mount an Arvados FUSE to a Docker container as volume

I would like to add a file system view of Arvados Keep to a Docker container. I created this file system view with arv-mount and it is based on File System in Userspace (FUSE).

Approach 1

$ docker run --rm -it -v /home/test/arv:/opt ubuntu:hirsute bash
docker: Error response from daemon: error while creating mount source path '/home/test/arv': mkdir /home/test/arv: file exists.

Approach 2
I also tried bind mounts

$ docker run --rm -it --mount type=bind,source=/home/test/arv,target=/opt,bind-propagation=rshared ubuntu:hirsute bash
docker: Error response from daemon: invalid mount config for type "bind": stat /home/test/arv: permission denied.

Both approaches I tried as non-root user (I configured Docker for non-root users) and root user.

I made it working by

  1. Adding user_allow_other to /etc/fuse.conf
  2. Creating FUSE mount with arv-mount --allow-other /home/test/arv
1 Like