Fix Container Diffing

This commit is contained in:
Kevin Baensch 2023-01-18 09:24:05 +01:00
parent a24298219e
commit 58ce939c40

View file

@ -17,7 +17,7 @@ query_docker () {
update_templates() {
CONTAINER_LIST=$(query_docker "containers/json" "?filters={%22network%22:[%22${NETWORK_NAME}%22],%22status%22:[%22running%22]}")
LABELS_NEW="$(echo "${CONTAINER_LIST}" | jq '.[].Labels | @base64' | sort)"
LABELS_NEW="$(echo "${CONTAINER_LIST}" | jq '.[].Labels | to_entries | map(select(.key | startswith("local.")) | .key + .value) | sort | .[] | @base64')"
if [ "${LABELS_NEW}" != "${LABELS_OLD}" ]
then
if [ -n "${LABELS_OLD}" ]