Merge pull request #1831 from thomasdarimont/feature/honor-docker-cert-path-env-variable

Honor DOCKER_CERT_PATH environment in nonNativeSetup
This commit is contained in:
French Ben 2016-07-21 14:13:35 -07:00 committed by GitHub
commit 98fef969e5
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ var DockerUtil = {
throw new Error('Cannot connect to the Docker daemon. Is the daemon running?'); throw new Error('Cannot connect to the Docker daemon. Is the daemon running?');
} }
} else { } 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)) { if (!fs.existsSync(certDir)) {
throw new Error('Certificate directory does not exist'); throw new Error('Certificate directory does not exist');
} }