diff --git a/lib/modem.js b/lib/modem.js index b26e139..25e4b3a 100644 --- a/lib/modem.js +++ b/lib/modem.js @@ -25,6 +25,10 @@ var defaultOpts = function() { // Strip off unix://, fall back to default of /var/run/docker.sock if // unix:// was passed without a path opts.socketPath = process.env.DOCKER_HOST.substring(7) || '/var/run/docker.sock'; + } else if (process.env.DOCKER_HOST.indexOf('npipe://') === 0) { + // Strip off npipe://, fall back to default of //./pipe/docker_engine if + // npipe:// was passed without a path + opts.socketPath = process.env.DOCKER_HOST.substring(8) || '//./pipe/docker_engine'; } else { var hostStr = process.env.DOCKER_HOST; if(hostStr.indexOf('\/\/') < 0) { diff --git a/package-lock.json b/package-lock.json index 54d52e9..bb81f4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "docker-modem", - "version": "2.0.1", + "version": "2.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 8d53a5e..ea68ae4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "docker-modem", "description": "Docker remote API network layer module.", - "version": "2.0.1", + "version": "2.0.2", "author": "Pedro Dias ", "maintainers": [ "apocas "