prevent restarting container check

This commit is contained in:
Andras Bacsai 2022-03-02 15:52:22 +01:00
parent ebde77008c
commit 3d2a34737b

View File

@ -178,7 +178,7 @@ export async function checkContainer(engine, container) {
const parsedStdout = JSON.parse(stdout); const parsedStdout = JSON.parse(stdout);
const status = parsedStdout.Status; const status = parsedStdout.Status;
const isRunning = parsedStdout.Running; const isRunning = parsedStdout.Running && parsedStdout.Restart;
if (status === 'exited' || status === 'created') { if (status === 'exited' || status === 'created') {
await asyncExecShell(`DOCKER_HOST="${host}" docker rm ${container}`); await asyncExecShell(`DOCKER_HOST="${host}" docker rm ${container}`);