`gcloud container images list` formatting
gcloud container images list --project=${PROJECT} does warn (!) but it’s easy to ignore that it only includes result for gcr.io and not any other subdomain (e.g. us.gcr.io):
gcloud container images list \
--project=${PROJECT}
NAME
gcr.io/${PROJECT}/endpoints-runtime-serverless
Only listing images in gcr.io/${PROJECT}. Use --repository to list images in other repositories.
gcloud container images list \
--repository=us.gcr.io/${PROJECT}
NAME
us.gcr.io/${PROJECT}/foo
us.gcr.io/${PROJECT}/bar
us.gcr.io/${PROJECT}/baz
NOTE Because the repository is explicitly
us.gcr.io/${PROJECT}, it does not include the previousendpoints-runtime-serverlessbecause that image is ingcr.io.
Also:
gcloud container images list \
--repository=us.gcr.io/${PROJECT} \
--format="value(name.scope(\"${PROJECT}\"))"
foo
bar
baz
# Otherwise we'd get the full repository name including the registry
gcloud container images list \
--repository=us.gcr.io/${PROJECT}
us.gcr.io/${PROJECT}/foo
us.gcr.io/${PROJECT}/bar
us.gcr.io/${PROJECT}/baz
NOTE Using the
gcloudprojectionscopeto filter the results to the image name only.