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.
Revisions
-
tianon renamed this gist
Nov 11, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
tianon revised this gist
Nov 11, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,7 @@ image='tianon/speedtest' layer='b31651d7665036bcf58a0b6b0d7aca173daff87b003ec50621cb0fde8d68864f' # docker inspect b31651d7665036bcf58a0b6b0d7aca173daff87b003ec50621cb0fde8d68864f | grep '"Size"' # "Size": 580580561, # ("Content-Length: 228991341" though...) 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 }')" -
tianon revised this gist
Nov 11, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,8 @@ set -e image='tianon/speedtest' layer='b31651d7665036bcf58a0b6b0d7aca173daff87b003ec50621cb0fde8d68864f' # docker inspect b31651d7665036bcf58a0b6b0d7aca173daff87b003ec50621cb0fde8d68864f | grep '"Size"' # "Size": 580580561, 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 }')" -
tianon revised this gist
Nov 11, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,7 @@ 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 }')" -
tianon revised this gist
Nov 11, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,4 +6,4 @@ layer='b31651d7665036bcf58a0b6b0d7aca173daff87b003ec50621cb0fde8d68864f' 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" -
tianon revised this gist
Nov 11, 2014 . 1 changed file with 8 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,9 @@ #!/bin/bash set -e image='tianon/speedtest' layer='b31651d7665036bcf58a0b6b0d7aca173daff87b003ec50621cb0fde8d68864f' 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" -
tianon renamed this gist
Nov 11, 2014 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,7 @@ VICTIM=tianon/speedtest LAYER=b31651d7665036bcf58a0b6b0d7aca173daff87b003ec50621cb0fde8d68864f # LAYER=80da4fde3cb0d72261fcf67a713a016105dee9667cbc228c6973523c09681bf3 SIGNATURE="`curl -iv -o/dev/null -H "X-Docker-Token: true" "https://registry.hub.docker.com/v1/repositories/$VICTIM/images" 2>&1 | awk '{print $3}' | grep signature | tr -d "\r\n"`" CF_URL="`curl -iv -o/dev/null -H "Authorization: Token $SIGNATURE" https://registry-1.docker.io/v1/images/$LAYER/layer 2>&1 | awk '{print $3}' | grep cloudfront | sed -e 's/\r\n//g' | tr -d "\r\n"`" echo "Going to fetch: $CF_URL" -
dmp42 created this gist
Sep 24, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ CREDS=XXXX:YYYYY VICTIM=tianon/speedtest LAYER=b31651d7665036bcf58a0b6b0d7aca173daff87b003ec50621cb0fde8d68864f # LAYER=80da4fde3cb0d72261fcf67a713a016105dee9667cbc228c6973523c09681bf3 SIGNATURE="`curl -iv -o/dev/null --basic -u $CREDS -H "X-Docker-Token: true" "https://registry.hub.docker.com/v1/repositories/$VICTIM/images" 2>&1 | awk '{print $3}' | grep signature | tr -d "\r\n"`" CF_URL="`curl -iv -o/dev/null -H "Authorization: Token $SIGNATURE" https://registry-1.docker.io/v1/images/$LAYER/layer 2>&1 | awk '{print $3}' | grep cloudfront | sed -e 's/\r\n//g' | tr -d "\r\n"`" echo "Going to fetch: $CF_URL" time curl -iv -o/dev/null "${CF_URL}" 2>&1 | grep -wi "content-length\|x-cache"