From 6acbe30e2e1122a9413277fc24b491551544233a Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Fri, 16 Aug 2019 21:21:30 +0200 Subject: [PATCH] fix(core): update --- ts/docker.classes.host.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ts/docker.classes.host.ts b/ts/docker.classes.host.ts index d50eeec..82ceb69 100644 --- a/ts/docker.classes.host.ts +++ b/ts/docker.classes.host.ts @@ -12,8 +12,16 @@ export class DockerHost { * the constructor to instantiate a new docker sock instance * @param pathArg */ - constructor(pathArg: string = 'http://unix:/var/run/docker.sock:') { - this.socketPath = pathArg; + constructor(pathArg?: string) { + let pathToUse: string; + if (pathArg) { + pathToUse = pathArg; + } else if (process.env.CI) { + pathToUse = 'tcp://docker:2375/'; + } else { + pathToUse = 'http://unix:/var/run/docker.sock:'; + } + this.socketPath = pathToUse; } /**