fix(docker): docker cleanup correctly checks the coolify.managed label (#8831)

This commit is contained in:
Dion VH
2026-08-17 12:07:12 +02:00
committed by GitHub
parent 70b9acc424
commit 5872cc095c
+1 -1
View File
@@ -131,7 +131,7 @@ class CleanupDocker
$commands[] = "docker images --format '{{.Repository}}:{{.Tag}}' | ".
$grepCommands.' | '.
"xargs -r -I {} sh -c 'docker inspect --format \"{{{{index .Config.Labels \\\"coolify.managed\\\"}}}}\" \"{}\" 2>/dev/null | grep -q true || docker rmi \"{}\" 2>/dev/null' || true";
"xargs -r -I {} sh -c 'docker inspect --format \"{{index .Config.Labels \\\"coolify.managed\\\"}}\" \"{}\" 2>/dev/null | grep -q true || docker rmi \"{}\" 2>/dev/null' || true";
return implode(' && ', $commands);
}