From 79c30d262c99fa0b42ace15efe96cd88a19a2509 Mon Sep 17 00:00:00 2001 From: Evan Bovie Date: Thu, 8 Sep 2022 16:55:03 -0700 Subject: [PATCH] Set default `hijack` option to true Speculating that a change in Docker Desktop 4.10.0 requires that the `Connection` and `Upgrade` headers be sent for stream multiplexing to work. For further detail see moby/moby#43799 --- lib/modem.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/modem.js b/lib/modem.js index 55fe4ed..eddc5b9 100644 --- a/lib/modem.js +++ b/lib/modem.js @@ -64,6 +64,10 @@ var defaultOpts = function () { opts.timeout = parseInt(process.env.DOCKER_CLIENT_TIMEOUT, 10); } } + + // Required for Docker Desktop >= 4.10.0 since DD proxies the docker socket and needs to be informed about the hijacking + // See https://github.com/moby/moby/issues/43799 + opts.hijack = true; return opts; };