Skip to content

Instantly share code, notes, and snippets.

@m0un10
Created September 25, 2020 08:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save m0un10/dec9ca080555ca7b7ea7abae98839600 to your computer and use it in GitHub Desktop.
BEARER=$(curl -u _token:$(gcloud auth print-access-token) https://gcr.io/v2/token?scope=repository:$NAME:pull | cut -d'"' -f 10)
RESPONSE=`curl -H "Authorization: Bearer $BEARER" https://gcr.io/v2/$NAME/manifests/$TAG`
DIGEST=`echo $RESPONSE | jq -r '.config.digest'`
curl -L -H "Authorization: Bearer $BEARER" https://gcr.io/v2/$NAME/blobs/$DIGEST | jq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment