From 6e4aa098fbdfb0912c50af4d289125a38c1c7a54 Mon Sep 17 00:00:00 2001 From: French Ben Date: Wed, 20 Jul 2016 16:49:04 -0700 Subject: [PATCH 1/3] Updated kitematic endpoint Signed-off-by: French Ben --- src/utils/SetupUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/SetupUtil.js b/src/utils/SetupUtil.js index 0dccd7b636..943ffa1285 100644 --- a/src/utils/SetupUtil.js +++ b/src/utils/SetupUtil.js @@ -91,7 +91,7 @@ export default { while (true) { try { router.get().transitionTo('setup'); - docker.setup(util.isWindows() ? 'docker.local':'localhost'); + docker.setup('localhost'); setupServerActions.started({started: true}); this.simulateProgress(20); metrics.track('Native Setup Finished'); From 806eb3b00c76404b587af3e974dfdf971df7ba70 Mon Sep 17 00:00:00 2001 From: French Ben Date: Wed, 20 Jul 2016 20:21:58 -0700 Subject: [PATCH 2/3] Fixed port publishing Signed-off-by: French Ben --- src/utils/DockerUtil.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/DockerUtil.js b/src/utils/DockerUtil.js index 40befff578..245ea8b244 100644 --- a/src/utils/DockerUtil.js +++ b/src/utils/DockerUtil.js @@ -157,7 +157,10 @@ var DockerUtil = { } if (!containerData.HostConfig || (containerData.HostConfig && !containerData.HostConfig.PortBindings)) { - containerData.PublishAllPorts = true; + if (!containerData.HostConfig) { + containerData.HostConfig = {}; + } + containerData.HostConfig.PublishAllPorts = true; } if (image.Config.Cmd) { From 3c8e9c8b9e13cabff108c8e28837c0c1e9c2afa9 Mon Sep 17 00:00:00 2001 From: French Ben Date: Wed, 20 Jul 2016 20:43:47 -0700 Subject: [PATCH 3/3] Moved all to named pipe Signed-off-by: French Ben --- src/utils/DockerUtil.js | 6 +----- src/utils/Util.js | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/utils/DockerUtil.js b/src/utils/DockerUtil.js index 245ea8b244..cf4b817009 100644 --- a/src/utils/DockerUtil.js +++ b/src/utils/DockerUtil.js @@ -35,11 +35,7 @@ var DockerUtil = { if (ip.indexOf('local') !== -1) { try { if (util.isWindows()) { - this.client = new dockerode({ - protocol: 'http', - host: ip, - port: 2375 - }); + this.client = new dockerode({socketPath: '//./pipe/docker_engine'}); } else { this.client = new dockerode({socketPath: '/var/run/docker.sock'}); } diff --git a/src/utils/Util.js b/src/utils/Util.js index 3545237e10..0071259a06 100644 --- a/src/utils/Util.js +++ b/src/utils/Util.js @@ -43,7 +43,7 @@ module.exports = { if (this.native === null) { if (this.isWindows()) { this.native = http.get({ - url: `http:////./pipe/docker_engine/v1.23/version` + url: `http:////./pipe/docker_engine/version` }, (response) => { if (response.statusCode !== 200 ) { return false;