From e48effca08c82f64e0daae36ae18433c3907b1ab Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 13 Oct 2020 12:28:58 +0200 Subject: [PATCH] Stop container before remove --- db/docker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/docker.js b/db/docker.js index ff330f824..c9a0b88a2 100644 --- a/db/docker.js +++ b/db/docker.js @@ -40,7 +40,7 @@ module.exports = class Docker { let runChown = process.platform != 'linux'; const container = await this.execP(`docker run --env RUN_CHOWN=${runChown} -d ${dockerArgs} salix-db`); - this.id = container.stdout; + this.id = container.stdout.trim(); try { if (this.isRandom) { @@ -177,7 +177,7 @@ module.exports = class Docker { } rm() { - return this.execP(`docker rm -fv ${this.id}`); + return this.execP(`docker stop ${this.id} && docker rm -v ${this.id}`); } /**