如何使用 gcloud 或其他 CLI 列出 Google 容器注册表中已发布的容器映像

2024-01-10

有没有gcloudAPI 或其他命令行界面 (CLI) 来访问私有 Google 容器注册表中已发布的容器映像列表? (这是 Google Cloud Platform 项目内的容器注册表)

gcloud container似乎没有帮助:

$ gcloud container
Usage: gcloud container [optional flags] <group | command>
  group may be           clusters | operations
  command may be         get-server-config

Deploy and manage clusters of machines for running containers.

flags:
  --zone ZONE, -z ZONE   The compute zone (e.g. us-central1-a) for the cluster

global flags:
  Run `gcloud -h` for a description of flags available to all commands.

command groups:
  clusters               Deploy and teardown Google Container Engine clusters.
  operations             Get and list operations for Google Container Engine
                         clusters.

commands:
  get-server-config      Get Container Engine server config.

我也不想用gcloud docker列出图像,因为这想要连接到我没有的特定 docker 守护进程。除非有办法告诉gcloud docker连接到远程公共 docker 守护进程,该守护进程可以读取通过我的项目推送到注册表的私有容器。


我们刚刚发布了一个新命令来列出存储库中的图像!你可以尝试一下:

gcloud alpha container images list --repository=gcr.io/$MYREPOSITORY

如果您想查看图像的特定标签,可以使用:

gcloud alpha container images list-tags gcr.io/$MYREPOSITORY/$MYIMAGE
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何使用 gcloud 或其他 CLI 列出 Google 容器注册表中已发布的容器映像 的相关文章

随机推荐