From dc6aded2b05e362b46eac38254d691576c8890fa Mon Sep 17 00:00:00 2001 From: Thomas Darimont Date: Sun, 17 Jul 2016 01:09:08 +0200 Subject: [PATCH] Honor DOCKER_CERT_PATH environment in nonNativeSetup Previously only certificates relative to the home folder were honored, which made using custom storage locations via MACHINE_STORAGE_PATH for docker machines quite cumbersome to use. This helps with the issue #1640. Signed-off-by: Thomas Darimont --- src/utils/DockerUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/DockerUtil.js b/src/utils/DockerUtil.js index 40befff578..2b518476cc 100644 --- a/src/utils/DockerUtil.js +++ b/src/utils/DockerUtil.js @@ -47,7 +47,7 @@ var DockerUtil = { throw new Error('Cannot connect to the Docker daemon. Is the daemon running?'); } } else { - let certDir = path.join(util.home(), '.docker/machine/machines/', name); + let certDir = process.env.DOCKER_CERT_PATH || path.join(util.home(), '.docker/machine/machines/', name); if (!fs.existsSync(certDir)) { throw new Error('Certificate directory does not exist'); }