- commit
- 439c00285ed4f9e08781911c32cfd8ce7dec1d17
- parent
- bde7bb6db0e2ade52a68c364d2ec8eb5cee3d81d
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2023-11-10 10:15
d-pull: make more informed choice for manifest index
Diffstat
| M | d-pull | 4 | ++-- |
1 files changed, 2 insertions, 2 deletions
diff --git a/d-pull b/d-pull
@@ -55,8 +55,8 @@ 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 57 57 while grep -q 'application\\/vnd.oci.image.index.v1+json' "$dir/manifest.json"; do58 -1 echo " fetching first manifest in index"59 -1 digest=$(jq -r '.manifests[0].digest' "$dir/manifest.json")-1 58 echo " fetching manifest for ${GOOS:-linux}/${GOARCH:-amd64}" -1 59 digest=$(jq -r "first(.manifests[] | select(.platform.os | test(\"${GOOS:-linux}\")) | select(.platform.architecture | test(\"${GOARCH:-amd64}\"))).digest" "$dir/manifest.json") 60 60 if [ -z "$digest" ]; then 61 61 echo "No matching manifest found" 62 62 exit 1