Skip to content

Instantly share code, notes, and snippets.

@kmassada
Created May 19, 2021 21:07
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 kmassada/7752d4f20e09018cd4c614cb7d9ebe89 to your computer and use it in GitHub Desktop.
Save kmassada/7752d4f20e09018cd4c614cb7d9ebe89 to your computer and use it in GitHub Desktop.
REGISTRY=https://index.docker.io/v2
REPO=library
IMAGE=debian
TAG=latest
TOKEN=$(curl -sSL "https://auth.docker.io/token?service=registry.docker.io&scope=repository:$REPO/$IMAGE:pull" \
| jq --raw-output .token)
curl -LH "Authorization: Bearer ${TOKEN}" "$REGISTRY/$REPO/$IMAGE/manifests/$TAG"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment