12

我使用 GCR 来存储我团队的私有 docker 注册表。我有一个 docker 图像,我想公开显示,以便多个项目可以使用它/与客户共享 / 等等。

如何在 Google 的 Container Registry 中公开 docker 映像?

4

2 回答 2

22

1) 创建一个空的云项目来存放公共注册表

2)推送一些东西到注册表(所以桶被创建)

docker push gcr.io/{PROJECT_NAME}/{IMAGE_NAME}

3)将桶中的所有未来对象公开:

gsutil defacl ch -u AllUsers:R gs://artifacts.{PROJECT_NAME}.appspot.com

4)将桶中所有当前对象公开(例如,您刚刚推送的图像):

gsutil acl ch -r -u AllUsers:R gs://artifacts.{PROJECT_NAME}.appspot.com

5)使存储桶本身公开(不由-r!):

gsutil acl ch -u AllUsers:R gs://artifacts.{PROJECT_NAME}.appspot.com

6) 如果需要,上传更多图片

感谢您如何在 Google Cloud Storage 中公开许多文件?在这里提供一些面包屑。

于 2015-11-18T23:53:58.443 回答
3

Google Cloud Registry (GCR) now allows you to easily do this through the Console. Click on "Settings" on the left panel, and change the Visibility to Public.


GCR Visibility Settings

于 2019-11-17T19:09:15.953 回答