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)

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

2 participants