相关疑难解决方法(0)

s3fs无法安装在docker容器内吗?

我想在docker容器中挂载s3fs.

我用s3fs制作了docker图像,并且这样做:

host$ docker run -it --rm docker/s3fs bash
[ root@container:~ ]$ s3fs s3bucket /mnt/s3bucket -o allow_other -o allow_other,default_acl=public-read -ouse_cache=/tmp
fuse: failed to open /dev/fuse: Operation not permitted
Run Code Online (Sandbox Code Playgroud)

显示"不允许操作"错误.

所以我用谷歌搜索,并做了这样(再次添加--privileged = true):

host$ docker run -it --rm --privileged=true docker/s3fs bash
[ root@container:~ ]$ s3fs s3bucket /mnt/s3bucket -o allow_other -o allow_other,default_acl=public-read -ouse_cache=/tmp
[ root@container:~ ]$ ls /mnt/s3bucket
ls: cannot access /mnt/s3bucket: Transport endpoint is not connected
[ root@container:~ ]$ fusermount -u /mnt/s3bucket
[ root@container:~ ]$ s3fs s3bucket /mnt/s3bucket -o allow_other -o …
Run Code Online (Sandbox Code Playgroud)

fuse s3fs docker

10
推荐指数
1
解决办法
1万
查看次数

标签 统计

docker ×1

fuse ×1

s3fs ×1