Forked from tianon/speedtest-registry-directly.sh
Last active
August 29, 2015 14:14
-
-
Save ahmetb/af912cc764ec2c2ce45c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| image='tianon/speedtest' | |
| layer='b31651d7665036bcf58a0b6b0d7aca173daff87b003ec50621cb0fde8d68864f' | |
| # <none> <none> b31651d7665036bcf58a0b6b0d7aca173daff87b003ec50621cb0fde8d68864f 10 weeks ago 670.7 MB | |
| token="$(curl -sSL -o /dev/null -D- -H 'X-Docker-Token: true' "https://index.docker.io/v1/repositories/$image/images" | awk -F ':[[:space:]]*|\r' '$1 == "X-Docker-Token" { print $2 }')" | |
| time curl -sSL -o /dev/null -D- -H "Authorization: Token $token" "https://registry-1.docker.io/v1/images/$layer/layer" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment