Skip to content

Commit ca280c1

Browse files
committed
Use Windows named pipe
1 parent 2f8472f commit ca280c1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

server.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ if (process.env.DOCKER_HOST) {
7878

7979
if (docker_host) {
8080
options.host = docker_host;
81-
options.port = docker_port;
82-
}
83-
else {
84-
options.socketPath = '/var/run/docker.sock';
81+
options.port = docker_port;
82+
} else if (process.platform === 'win32') {
83+
options.socketPath = '\\\\.\\pipe\\docker_engine';
84+
} else {
85+
options.socketPath = '/var/run/docker.sock';
8586
}
8687

8788
var req = request(options, (res) => {

0 commit comments

Comments
 (0)