如何使用gcloud或其他CLI在Google

如何使用gcloud或其他CLI在Google

本文介绍了如何使用gcloud或其他CLI在Google Container Registry中列出发布的容器图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一个 gcloud API或其他命令行界面(CLI)访问私有Google容器注册表中发布的容器图像列表? (这是Google Cloud Platform项目中的容器注册表)

Is there a gcloud API or other command line interface (CLI) to access the list of published container images in the private Google Container Registry? (That is the container registry inside a Google Cloud Platform project)

gcloud容器似乎没有帮助: / p>

gcloud container does not seem to help:

$ 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 连接到可以通过我的项目读取通过注册表推送的私有容器的远程公共码头守护程序。

I also don't want to use gcloud docker to list images because this wants to connect to a particular docker daemon that I don't have. Unless there is a way to tell gcloud docker to connect to a remote public docker daemon that can read the private containers pushed to the registry through my project.

推荐答案

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

We just released a new command to list the images in your repository! You can try it out with:

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

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

If you want to see the specific tags for an image you can use:

gcloud alpha container images list-tags gcr.io/$MYREPOSITORY/$MYIMAGE

这篇关于如何使用gcloud或其他CLI在Google Container Registry中列出发布的容器图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 21:58