mirror of https://github.com/docker/docs.git
Merge pull request #1844 from thomasdarimont/issue/honor-machine-storage-path-for-vboxlogs
Honor MACHINE_STORAGE_PATH environment for virtualBoxLogs
This commit is contained in:
commit
ba7fb1fc84
|
|
@ -177,7 +177,14 @@ var DockerMachine = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
virtualBoxLogs: function (machineName = this.name()) {
|
virtualBoxLogs: function (machineName = this.name()) {
|
||||||
let logsPath = path.join(util.home(), '.docker', 'machine', 'machines', machineName, machineName, 'Logs', 'VBox.log');
|
|
||||||
|
var logsPath = null;
|
||||||
|
if (process.env.MACHINE_STORAGE_PATH) {
|
||||||
|
logsPath = path.join(process.env.MACHINE_STORAGE_PATH, 'machines', machineName, machineName, 'Logs', 'VBox.log');
|
||||||
|
} else {
|
||||||
|
logsPath = path.join(util.home(), '.docker', 'machine', 'machines', machineName, machineName, 'Logs', 'VBox.log');
|
||||||
|
}
|
||||||
|
|
||||||
let logData = null;
|
let logData = null;
|
||||||
try {
|
try {
|
||||||
logData = fs.readFileSync(logsPath, 'utf8');
|
logData = fs.readFileSync(logsPath, 'utf8');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue