Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ohsawa0515/038a68277b2d24d663af9380ae8e344d to your computer and use it in GitHub Desktop.
Save ohsawa0515/038a68277b2d24d663af9380ae8e344d to your computer and use it in GitHub Desktop.
List container images that exist on all hosts.
#!/bin/bash
project=$1
hosts=("gcr.io" "us.gcr.io" "eu.gcr.io" "asia.gcr.io")
for host in ${hosts[@]}; do
gcloud container images list --repository=$host/$project --format json | jq -r ".[].name"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment