Stop container before remove
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-10-13 12:28:58 +02:00
parent 642e2011af
commit e48effca08
1 changed files with 2 additions and 2 deletions

View File

@ -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}`);
}
/**