问题描述
我想将 Arvados Keep 的文件系统视图添加到 Docker 容器。我使用 arv-mount
创建了这个文件系统视图,它基于用户空间中的文件系统 (FUSE)。
方法一
$ 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.
方法 2
我也试过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.
我以非 root 用户(我为 non-root users 配置 Docker)和 root 用户的身份尝试了两种方法。
解决方法
我让它工作了
- 将
user_allow_other
添加到/etc/fuse.conf
- 使用
arv-mount --allow-other /home/test/arv
创建 FUSE 挂载