Stop container before remove
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
642e2011af
commit
e48effca08
|
@ -40,7 +40,7 @@ module.exports = class Docker {
|
||||||
let runChown = process.platform != 'linux';
|
let runChown = process.platform != 'linux';
|
||||||
|
|
||||||
const container = await this.execP(`docker run --env RUN_CHOWN=${runChown} -d ${dockerArgs} salix-db`);
|
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 {
|
try {
|
||||||
if (this.isRandom) {
|
if (this.isRandom) {
|
||||||
|
@ -177,7 +177,7 @@ module.exports = class Docker {
|
||||||
}
|
}
|
||||||
|
|
||||||
rm() {
|
rm() {
|
||||||
return this.execP(`docker rm -fv ${this.id}`);
|
return this.execP(`docker stop ${this.id} && docker rm -v ${this.id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue