Google Cloud Container Registry List images in subdirectory with gcloud command

How can I get a list of images in a "subdirectories" in a Google Cloud Container Registry?

I have those images on 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

But when I issue the command...

gcloud container images list

It only gives me

NAME
gcr.io/project-id/website

I would like to be able to get all images for a search query like project-id/website and get all 4 images above.

If I issue this command:

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

I get no results of course.

I searched Google and checked the help pages to no avail.

Thank you!

Upvotes: 0

Views: 1350

Answers (1)

Answering my own question. I went back to GCP and saw this in the user interface:

enter image description here

So it clicked when I saw the "Repositories" title. Images are in repositories and can be nested.

So I tried this command:

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

And got back

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

Upvotes: 2

Related Questions