docker 映射 fuse 类型的存储目录
尝试使用rclone的mount挂载s3对象存储到本地,想把挂载以后的目录映射给docker容器使用,但在创建容器的时候会报错:
docker: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /path/to/you.
解决办法是启用fuse的allow_other
选项,编辑配置文件/etc/fuse.conf
,删掉 user_allow_other
前面的#号,启用这个功能。
然后重新挂载s3存储,添加 -o allow_other
参数:
$ rclone mount minio:memory /mnt/s3 --allow-other
重启容器即可