mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
Fix formatting in CleanupDocker.php for docker command
Previously, the image prune command used {{{{index .Config.Labels "coolify.managed"}}}},
which produces 4 literal braces and causes a Go template parsing error. As a result,
all images were deleted regardless of the label.
This commit fixes the command to use {{index .Config.Labels "coolify.managed"}}, so
images with the label coolify.managed=true are preserved during cleanup.
This commit is contained in:
parent
e1f940dc22
commit
9e4cd96187
1 changed files with 1 additions and 1 deletions
|
|
@ -127,7 +127,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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue