Add dockerDataDisk to disks response

This commit is contained in:
Girish Ramakrishnan
2019-08-19 13:50:44 -07:00
parent 2b484c0382
commit b301e5b151
6 changed files with 143 additions and 93 deletions
+1 -12
View File
@@ -34,18 +34,7 @@ exports = module.exports = {
// timeout is optional
function connectionInstance(timeout) {
var Docker = require('dockerode');
var docker;
if (process.env.BOX_ENV === 'test') {
// test code runs a docker proxy on this port
docker = new Docker({ host: 'http://localhost', port: 5687, timeout: timeout });
// proxy code uses this to route to the real docker
docker.options = { socketPath: '/var/run/docker.sock' };
} else {
docker = new Docker({ socketPath: '/var/run/docker.sock', timeout: timeout });
}
var docker = new Docker({ socketPath: '/var/run/docker.sock', timeout: timeout });
return docker;
}