run with network
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
9644e1e5ec
commit
8468eda05a
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue