fix: cleanup coolify images

This commit is contained in:
Andras Bacsai
2022-03-02 20:57:28 +01:00
parent 0926d40247
commit 6655fb182c
2 changed files with 3 additions and 2 deletions

View File

@@ -8,9 +8,10 @@ export default async function () {
const host = getEngine(destinationDocker.engine);
// Cleanup old coolify images
try {
const { stdout: images } = await asyncExecShell(
let { stdout: images } = await asyncExecShell(
`DOCKER_HOST=${host} docker images coollabsio/coolify --filter before="coollabsio/coolify:latest" -q | xargs `
);
images = images.trim();
if (images) {
await asyncExecShell(`DOCKER_HOST=${host} docker rmi ${images}`);
}