Skip to content

Route container host-gateway to loopback on Windows - #6859

Open
Badbird5907 wants to merge 1 commit into
cloudflare:mainfrom
Badbird5907:windows-container-gateway
Open

Route container host-gateway to loopback on Windows#6859
Badbird5907 wants to merge 1 commit into
cloudflare:mainfrom
Badbird5907:windows-container-gateway

Conversation

@Badbird5907

@Badbird5907 Badbird5907 commented Jul 5, 2026

Copy link
Copy Markdown

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)

@Badbird5907
Badbird5907 requested review from a team as code owners July 5, 2026 21:28
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Badbird5907

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Jul 5, 2026
@Badbird5907

Copy link
Copy Markdown
Author

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.
@petebacondarwin
petebacondarwin force-pushed the windows-container-gateway branch from 8ef9bd4 to 5b344d5 Compare July 23, 2026 15:19
@codspeed-hq

codspeed-hq Bot commented Jul 23, 2026

Copy link
Copy Markdown

Merging this PR will regress 1 benchmark

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
❌ 1 regressed benchmark
✅ 70 untouched benchmarks
⏩ 129 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

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)

Open in CodSpeed

Footnotes

  1. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants