【问题标题】:Install gcsfuse in Google Cloud Container Optimized OS (COS)在 Google Cloud Container Optimized OS (COS) 中安装 gcsfuse
【发布时间】:2021-03-27 16:49:39
【问题描述】:

有谁知道如何将gcsfuse 安装到 Google Container Optimized OS 中,以便我可以在 VM 实例本身中安装存储桶。

我尝试从主机运行带有 gcsfuse 安装卷的 docker。 docker 容器成功地将存储桶挂载到主机卷中。从宿主卷查看时,它是空的,但容器中有桶数据。

docker run --privileged -v /mnt/disks/bucket:/bucket \
  --device /dev/fuse \
  my_gcsfuse /go/bin/gcsfuse -o allow_other <BUCKET> /bucket
2020/12/16 23:27:21.161246 Initializing GCS connection.
2020/12/16 23:27:21.169616 File system has been successfully mounted.

从容器中,我可以看到所有文件都属于 gcs 存储桶文件,但不属于主机,即使我将卷从主机安装到容器中。

【问题讨论】:

    标签: google-cloud-platform google-cloud-storage gcsfuse


    【解决方案1】:

    git 上解释的问题,docker-default apparmor 配置文件拒绝所有挂载。这个 '--security-opt apparmor=unconfined' flag 可以挂载 GCS 存储桶。

    【讨论】:

      猜你喜欢
      • 2021-06-01
      • 1970-01-01
      • 2018-08-06
      • 2023-02-08
      • 1970-01-01
      • 2020-12-14
      • 1970-01-01
      • 1970-01-01
      • 2018-06-20
      相关资源
      最近更新 更多