Google Cloud Container Registry使用gcloud命令在子目录中列出图像

问题描述 投票:0回答:1

如何在Google Cloud Container Registry的“子目录”中获取图像列表?

我在GCP上有这些图片:

gcr.io/project-id/website/api
gcr.io/project-id/website/api-builder
gcr.io/project-id/website/frontend
gcr.io/project-id/website/frontend-builder

但是当我发出命令时......

gcloud container images list

它只给了我

NAME
gcr.io/project-id/website

我希望能够获得像project-id/website这样的搜索查询的所有图像,并获得上面的所有4张图像。

如果我发出此命令:

gcloud container images list-tags gcr.io/project-id/website

我当然没有结果。

我搜索了谷歌并检查了帮助页面无济于事。

谢谢!

docker google-cloud-platform gcloud docker-registry
1个回答
1
投票

回答我自己的问题。我回到GCP并在用户界面中看到了这个:

enter image description here

所以当我看到“存储库”标题时它点击了。图像位于存储库中,可以嵌套。

所以我尝试了这个命令:

gcloud container images list --repository gcr.io/project-id/website

然后回来了

NAME
gcr.io/project-id/website/api
gcr.io/project-id/website/api-builder
gcr.io/project-id/website/frontend
gcr.io/project-id/website/frontend-builder
© www.soinside.com 2019 - 2024. All rights reserved.