diff --git a/db/docker.js b/db/docker.js index 1ab4115e5..b52c2639b 100644 --- a/db/docker.js +++ b/db/docker.js @@ -42,9 +42,13 @@ module.exports = class Docker { let runChown = process.platform != 'linux'; + let network = ''; + if (ci) network = '--network="jenkins"'; + log('Starting container...'); const container = await this.execP(` docker run \ + ${network} \ --env RUN_CHOWN=${runChown} \ -d ${dockerArgs} salix-db `); @@ -52,9 +56,6 @@ module.exports = class Docker { try { if (this.isRandom) { - if (ci) - await this.execP(`docker network connect jenkins ${this.id}`); - let inspect = await this.execP(`docker inspect -f "{{json .NetworkSettings}}" ${this.id}`); let netSettings = JSON.parse(inspect.stdout);