Commit 0fd2b679 by Felix Abecassis

lxc-oci: support index files with multiple manifests

Previously, the output would contain "null" strings in this case. Signed-off-by: 's avatarFelix Abecassis <fabecassis@nvidia.com>
parent ca1280fe
......@@ -63,7 +63,7 @@ getconfigpath() {
basedir="$1"
q="$2"
digest=`cat "${basedir}/index.json" | jq -c -r --arg q "$q" '.manifests[] | if .annotations."org.opencontainers.image.ref.name" == $q then .digest else null end'`
digest=`cat "${basedir}/index.json" | jq -c -r --arg q "$q" '.manifests[] | if .annotations."org.opencontainers.image.ref.name" == $q then .digest else empty end'`
if [ -z "${digest}" ]; then
echo "$q not found in index.json" >&2
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment