【发布时间】:2016-04-19 05:00:05
【问题描述】:
我在 docker 容器(基本映像 centos7)中使用 gcsfuse,但无法读取或写入已挂载的目录。
我正在使用 gcsfuse 安装目录,如下所示:
[root@6c24c3a6cc28 /]# gcsfuse --foreground --key-file=/src/gcloud_service_account.json my-bucket /gcloud/
Using mount point: /gcloud
Opening GCS connection...
Opening bucket...
Mounting file system...
File system has been successfully mounted.
当我尝试读取或写入已安装的目录时,我收到此错误:
[root@6c24c3a6cc28 /]# ls -la /gcloud/
ls: 读取目录/gcloud/: 输入/输出错误
共 0
gcsfuse 打印出调试信息:
fuse: 2016/01/14 01:33:41.110260 *fuseops.ReadDirOp 错误:readAllEntries: ReadEntries: ListObjects: Get https://www.googleapis.com/storage/v1/b/my-bucket/o? delimiter=%2F&projection=full:私钥应该是 PEM 或普通 PKSC1 或 PKCS8;解析错误:asn1:结构错误:标签不匹配(16 vs {class:1 tag:27 length:123 isCompound:true}){optional:false explicit:false application:false defaultValue: tag: stringType:0 timeType: 0 set:false omitEmpty:false} pkcs1PrivateKey @2
我正在像这样运行 docker:
docker run -p 3000:3000 \
--特权\
--cap-添加 SYS_ADMIN \
--设备/开发/保险丝\
--name gcsfuseTest \
gcsfuseImage
我不能 100% 确定 --cap-add SYS_ADMIN 和 --device /dev/fuse 能得到什么。我根据在 docker 上使用 fuse 安装的其他用户放置它们。
【问题讨论】: