Skip to content

Commit c04f8b4

Browse files
committed
feat(containers): stop container gracefully before removing
1 parent 1753441 commit c04f8b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/api/docker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ export function killContainer(id: string): Promise<void> {
196196
if (containerInfo.State.Status === 'exited') {
197197
return container.remove();
198198
} else if (containerInfo.State.Status === 'running') {
199-
return container.remove({ force: true });
199+
return container.stop()
200+
.then(container => container.remove());
200201
} else {
201202
return Promise.resolve();
202203
}

0 commit comments

Comments
 (0)