fix(core): update

This commit is contained in:
Philipp Kunz 2019-08-16 21:21:30 +02:00
parent eb6f7889d0
commit 6acbe30e2e

View File

@ -12,8 +12,16 @@ export class DockerHost {
* the constructor to instantiate a new docker sock instance * the constructor to instantiate a new docker sock instance
* @param pathArg * @param pathArg
*/ */
constructor(pathArg: string = 'http://unix:/var/run/docker.sock:') { constructor(pathArg?: string) {
this.socketPath = pathArg; 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;
} }
/** /**