- commit
- 582f40b54af91ec39f1e3a0ffe8d0db84822cdbd
- parent
- 439c00285ed4f9e08781911c32cfd8ce7dec1d17
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2024-01-10 13:49
d-pull: fall back to docker manifest
Diffstat
| M | d-pull | 6 | ++++-- |
1 files changed, 4 insertions, 2 deletions
diff --git a/d-pull b/d-pull
@@ -1,5 +1,7 @@ 1 1 #!/bin/sh -e 2 2 -1 3 MANIFEST_TYPE='application/vnd.oci.image.manifest.v1+json, application/vnd.docker.distribution.manifest.v2+json;q=0.5' -1 4 3 5 CACHE_DIR="$HOME/.cache/d-utils/" 4 6 mkdir -p "$CACHE_DIR" 5 7 @@ -52,7 +54,7 @@ mkdir -p "$dir/rootfs" 52 54 echo "$lib/$img:$tag" > "$dir/image.txt" 53 55 54 56 echo " fetching manifest"55 -1 curl -s -H "$auth" -H "Accept: application/vnd.oci.image.manifest.v1+json" "$url/manifests/$tag" -o "$dir/manifest.json"-1 57 curl -s -H "$auth" -H "Accept: $MANIFEST_TYPE" "$url/manifests/$tag" -o "$dir/manifest.json" 56 58 57 59 while grep -q 'application\\/vnd.oci.image.index.v1+json' "$dir/manifest.json"; do 58 60 echo " fetching manifest for ${GOOS:-linux}/${GOARCH:-amd64}" @@ -61,7 +63,7 @@ while grep -q 'application\\/vnd.oci.image.index.v1+json' "$dir/manifest.json"; 61 63 echo "No matching manifest found" 62 64 exit 1 63 65 fi64 -1 curl -s -L -H "$auth" -H "Accept: application/vnd.oci.image.manifest.v1+json" "$url/manifests/$digest" -o "$dir/manifest.json"-1 66 curl -s -L -H "$auth" -H "Accept: $MANIFEST_TYPE" "$url/manifests/$digest" -o "$dir/manifest.json" 65 67 done 66 68 67 69 echo " fetching config"