Skip to content

Instantly share code, notes, and snippets.

@nishakm
Created July 14, 2020 23:25
Show Gist options
  • Save nishakm/4c2d078ae6f8fa63c7733e0f3105dfd8 to your computer and use it in GitHub Desktop.
Save nishakm/4c2d078ae6f8fa63c7733e0f3105dfd8 to your computer and use it in GitHub Desktop.
verifying downloaded digests
$ token="$(curl -fsSL "https://auth.docker.io/token?service=registry.docker.io&scope=repository:library/debian:pull" | jq --raw-output '.token')"
nisha@ubuntu ~ $ manifest="$(curl -fsSL -H "Authorization: Bearer $token" -H "Accept: application/vnd.docker.distribution.manifest.v2+json" "https://index.docker.io/v2/library/debian/manifests/sha256:e8bab439d86e39a0f694344ab0c11f77bce1460c13c903c437ee9da69c7b6fa3")"
nisha@ubuntu ~ $ echo $manifest | sha256sum
edb9b33918300be33fb87aa3b451493b94d0290edc9de95caae90f754996d0df -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment