Fixes #20069
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
| ... | ... |
@@ -95,6 +95,7 @@ while [ $# -gt 0 ]; do |
| 95 | 95 |
echo "skipping existing ${imageId:0:12}"
|
| 96 | 96 |
continue |
| 97 | 97 |
fi |
| 98 |
+ token="$(curl -sSL "https://auth.docker.io/token?service=registry.docker.io&scope=repository:$image:pull" | jq --raw-output .token)" |
|
| 98 | 99 |
curl -SL --progress -H "Authorization: Bearer $token" "https://registry-1.docker.io/v2/$image/blobs/$imageLayer" -o "$dir/$imageId/layer.tar" # -C - |
| 99 | 100 |
done |
| 100 | 101 |
echo |