Support local container development on Windows#14566
Open
Badbird5907 wants to merge 2 commits into
Open
Conversation
🦋 Changeset detectedLatest commit: f9dd2c9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
wrangler dev, the Vite plugin, and getPlatformProxy previously errored on Windows and required WSL for containers. The Workers runtime can't connect to the Windows Docker named pipe directly, so Miniflare now bridges it to a loopback TCP proxy (containers-shared/docker-proxy) for the runtime while the Docker CLI keeps using the pipe. Removes the hard win32 guard and wires the resolved engine address through Miniflare's container-engine setup, disposing the proxy with the instance.
7099f3b to
461adc3
Compare
Contributor
|
Marking this as blocked on the workerd PR being merged and released. |
Contributor
|
Assigned to @emily-shen since, while it looks fine to me, I'd like her eyes on this too. |
@cloudflare/autoconfig
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your change...
This PR adds support for local container development on Windows by routing the container egress listener to loopback, matching the existing macOS behavior (related workerd change: cloudflare/workerd#6859)
The Workers runtime connects to the container engine via
kj::Network::parseAddress, which on Windows can only resolve TCP addresses (no named-pipe support). Docker Desktop on Windows listens on a named pipe (\\.\pipe\docker_engine), so this PR proxies the named pipe to a loopback TCP address and hands the runtime that address instead.I didn't start a discussion first: I needed local container dev to work on native Windows (rather than requiring WSL), so I forked & implemented it and decided to open a PR in case it's useful.
Parts of this PR was written with AI; happy to iterate on the implementation.