Route container host-gateway to loopback on Windows - #6859
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
Hey, any updates on getting this merged? |
The container egress listener binds to the address returned by gatewayForPlatform. On macOS it returns none (falls back to loopback) because Docker Desktop routes the host-gateway through a VM; every other platform got the Docker bridge gateway IP. On Windows the bridge IP is not a local interface on the host, so the bind fails and container start() aborts. Windows Docker Desktop behaves like macOS, so include _WIN32 in the loopback branch.
8ef9bd4 to
5b344d5
Compare
Merging this PR will regress 1 benchmark
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | request[RegExpBenchmark] |
4.1 ms | 4.5 ms | -8.79% |
| ⚡ | simpleStringBody[Response] |
23.4 µs | 20.8 µs | +12.42% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing Badbird5907:windows-container-gateway (5b344d5) with main (97a94ed)
Footnotes
-
129 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
The container egress listener binds to the address returned by gatewayForPlatform. On macOS it returns none (falls back to loopback) because Docker Desktop routes the host-gateway through a VM; every other platform got the Docker bridge gateway IP. On Windows the bridge IP is not a local interface on the host, so the bind fails and container start() aborts. Windows Docker Desktop behaves like macOS, so include _WIN32 in the loopback branch.
This is to add support for local container dev on windows machines. (cloudflare/workers-sdk#14566)