- commit
- bde7bb6db0e2ade52a68c364d2ec8eb5cee3d81d
- parent
- fb901f42d81e8d214ec14e0d71151d40d3b281d3
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2023-11-10 10:13
d-pull: add basic support for manifest index https://github.com/opencontainers/image-spec/blob/main/image-index.md
Diffstat
| M | d-pull | 10 | ++++++++++ |
1 files changed, 10 insertions, 0 deletions
diff --git a/d-pull b/d-pull
@@ -54,6 +54,16 @@ echo "$lib/$img:$tag" > "$dir/image.txt" 54 54 echo " fetching manifest" 55 55 curl -s -H "$auth" -H "Accept: application/vnd.oci.image.manifest.v1+json" "$url/manifests/$tag" -o "$dir/manifest.json" 56 56 -1 57 while grep -q 'application\\/vnd.oci.image.index.v1+json' "$dir/manifest.json"; do -1 58 echo " fetching first manifest in index" -1 59 digest=$(jq -r '.manifests[0].digest' "$dir/manifest.json") -1 60 if [ -z "$digest" ]; then -1 61 echo "No matching manifest found" -1 62 exit 1 -1 63 fi -1 64 curl -s -L -H "$auth" -H "Accept: application/vnd.oci.image.manifest.v1+json" "$url/manifests/$digest" -o "$dir/manifest.json" -1 65 done -1 66 57 67 echo " fetching config" 58 68 config=$(jq -r '.config.digest' "$dir/manifest.json") 59 69 curl -s -L -H "$auth" "$url/blobs/$config" | jq '.config' > "$dir/config.json"