fix dockerproxy test
This commit is contained in:
@@ -73,7 +73,9 @@ async function containersCreate(req, res, next) {
|
||||
|
||||
debug('containersCreate: original bind mounts:', req.body.HostConfig.Binds);
|
||||
|
||||
const result = await volumes.list();
|
||||
const [error, result] = await safe(volumes.list());
|
||||
if (error) return next(new HttpError(500, `Error listing volumes: ${error.message}`));
|
||||
|
||||
const volumesByName = {};
|
||||
result.forEach(r => volumesByName[r.name] = r);
|
||||
|
||||
@@ -146,8 +148,6 @@ async function start() {
|
||||
// Overwrite the default 2min request timeout. This is required for large builds for example
|
||||
gHttpServer.setTimeout(60 * 60 * 1000);
|
||||
|
||||
debug(`startDockerProxy: started proxy on port ${constants.DOCKER_PROXY_PORT}`);
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
gHttpServer.on('upgrade', function (req, client, head) {
|
||||
// Create a new tcp connection to the TCP server
|
||||
@@ -176,6 +176,7 @@ async function start() {
|
||||
});
|
||||
});
|
||||
|
||||
debug(`start: listening on 172.18.0.1:${constants.DOCKER_PROXY_PORT}`);
|
||||
await util.promisify(gHttpServer.listen.bind(gHttpServer))(constants.DOCKER_PROXY_PORT, '172.18.0.1');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user