This commit is contained in:
Andras Bacsai
2022-10-12 12:02:47 +02:00
parent bef5da49cf
commit 324038486f
4 changed files with 110 additions and 88 deletions

View File

@@ -87,6 +87,9 @@ export async function removeContainer({
await executeDockerCmd({ dockerId, command: `docker stop -t 0 ${id}` })
await executeDockerCmd({ dockerId, command: `docker rm ${id}` })
}
if (JSON.parse(stdout).Status === 'exited') {
await executeDockerCmd({ dockerId, command: `docker rm ${id}` })
}
} catch (error) {
throw error;
}