我知道你可以做以下检索的特定图像的标签列表:GCR使用CLI来检索无标签的图像
gcloud容器图片列出--repository = gcr.io/myproject的
但我不知道我是否还可以使用gcloud CLI没有一个标签来检索图像。
的无标签的图像显示在谷歌云主机的网络接口。
解决方案
gcloud容器图片列表标签gcr.io/myproject/repo --filter = ' - 标签:*'
我知道你可以做以下检索的特定图像的标签列表:GCR使用CLI来检索无标签的图像
gcloud容器图片列出--repository = gcr.io/myproject的
但我不知道我是否还可以使用gcloud CLI没有一个标签来检索图像。
的无标签的图像显示在谷歌云主机的网络接口。
解决方案
gcloud容器图片列表标签gcr.io/myproject/repo --filter = ' - 标签:*'
list-tags
将是您的需求更好。特别是,如果你想看到的所有图像(包括无标记的)信息:
gcloud container images list-tags gcr.io/project-id/repository --format=json
如果你要打印的是未经标记的图像的摘要:
gcloud container images list-tags gcr.io/project-id/repository --filter='-tags:*' --format='get(digest)' --limit=$BIG_NUMBER
我想你在找什么是list-tags子命令:
gcloud container images list-tags --repository=gcr.io/myproject/myrepo
第一命令不给我未经标记的图像,但'--filter =“ - 标签:*”'部分的伎俩! – TheWolfNL