diff --git a/contrib/download-frozen-image-v2.sh b/contrib/download-frozen-image-v2.sh index 6d0a8d6e8a0e7ad45ce12155e6e9b643e316ac7c..582cbb668168aec52537104ac50475b5ce4f244f 100755 --- a/contrib/download-frozen-image-v2.sh +++ b/contrib/download-frozen-image-v2.sh @@ -157,6 +157,7 @@ while [ $# -gt 0 ]; do echo "skipping existing ${layerId:0:12}" continue fi + token="$(curl -fsSL "https://auth.docker.io/token?service=registry.docker.io&scope=repository:$image:pull" | jq --raw-output '.token')" curl -fSL --progress \ -H "Authorization: Bearer $token" \ "https://registry-1.docker.io/v2/$image/blobs/$layerDigest" \ @@ -229,6 +230,7 @@ while [ $# -gt 0 ]; do echo "skipping existing ${layerId:0:12}" continue fi + token="$(curl -fsSL "https://auth.docker.io/token?service=registry.docker.io&scope=repository:$image:pull" | jq --raw-output '.token')" curl -fSL --progress -H "Authorization: Bearer $token" "https://registry-1.docker.io/v2/$image/blobs/$imageLayer" -o "$dir/$layerId/layer.tar" # -C - done ;;