Skip to content
Snippets Groups Projects

Resolve "Force `ddeploy` options (e.g. image retention)"

Merged Jon Azpiazu requested to merge 43-force-ddeploy-options-e-g-image-retention into master
All threads resolved!
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -15,7 +15,7 @@ if ! docker inspect --type=image "$1" > /dev/null ; then
fi
for label in "${!enforced_labels[@]}" ; do
if ! docker inspect -f "{{json .Config.Labels }}" "$image_name" | jq -e '.['\"$label\"']' ; then
if ! docker inspect -f "{{json .Config.Labels }}" "$image_name" | jq -e '.['\"$label\"']' > /dev/null ; then
echo "Key not found"
echo "$label = ${enforced_labels[$label]}"
label_args+=" --label $label=\"${enforced_labels[$label]}\""
@@ -24,5 +24,5 @@ done
if [ -v label_args ]; then
run_command="echo \"FROM $image_name\" | docker build $label_args -t $image_name -"
echo "$run_command"
eval "$run_command"
fi
Loading