Permalink
Browse files

fix(docker): stop container or kill if not going nice way

  • Loading branch information...
jkuri committed Nov 10, 2017
1 parent efd99d3 commit 925684de88c89c5d94ff6ef89e74f8abb63537f4
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/api/docker.ts
@@ -180,7 +180,9 @@ export function killContainer(id: string): Promise<void> {
container = docker.getContainer(id);
container.inspect()
.then(containerInfo => {
if (containerInfo.State.Status === 'running') {
if (containerInfo.State.Status === 'exited') {
return container.remove();
} else if (containerInfo.State.Status === 'running') {
return container.kill().then(() => container.remove());
} else {
return Promise.resolve();

0 comments on commit 925684d

Please sign in to comment.