mirror of https://github.com/docker/docs.git
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 <thomas.darimont@gmail.com>
This commit is contained in:
parent
38470dd381
commit
dc6aded2b0
|
|
@ -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');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue