From b089fdbad9a890c76df63b1849dbb4d3718ca186 Mon Sep 17 00:00:00 2001 From: G Date: Wed, 4 Dec 2024 17:26:33 +0200 Subject: [PATCH] feat: override image labels --- oci/private/image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oci/private/image.sh b/oci/private/image.sh index 32cb6ee2..07aaa417 100644 --- a/oci/private/image.sh +++ b/oci/private/image.sh @@ -167,7 +167,7 @@ for ARG in "$@"; do CONFIG=$(jq --arg workdir "${ARG#--workdir=}" '.config.WorkingDir = $workdir' <<<"$CONFIG") ;; --labels=*) - CONFIG=$(jq --rawfile labels "${ARG#--labels=}" '.config.Labels += ($labels | split("\n") | map(select(. | length > 0)) | map(. | split("=")) | map({key: .[0], value: .[1:] | join("=")}) | from_entries)' <<<"$CONFIG") + CONFIG=$(jq --rawfile labels "${ARG#--labels=}" '.config.Labels = ($labels | split("\n") | map(select(. | length > 0)) | map(. | split("=")) | map({key: .[0], value: .[1:] | join("=")}) | from_entries)' <<<"$CONFIG") ;; --created=*) CONFIG=$(jq --rawfile created "${ARG#--created=}" '.created = $created' <<<"$CONFIG")