Repository navigation
Local container dev works natively on Windows with Docker Desktop over TCP; the Windows block could be lifted #16896
workers-devprod
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Moved from #16816. Originally opened by fgcoelho on 2026-11-10.
What happens
wrangler devand the Vite plugin refuse to start local containers on Windows:The guard is in
packages/containers-shared/src/images.ts#L147. The comments inresolveDockerHost(utils.ts#L367) andgetContainerEngine(miniflare/src/plugins/core/index.ts#L1228) give the reason: workerd can't use Windows named pipes.That limitation is real, but it only rules out the pipe. Docker over TCP works.
Why the pipe fails and TCP works
workerd opens the Docker socket with
network.parseAddress(dockerPath)(container-client.c++,dockerApiRequestRaw). On Windows that is kj'sSocketAddress::parseinasync-io-win32.c++, which only understands IP addresses and host names. It has nounix:or pipe branch, so//./pipe/docker_engineandnpipe://...can never connect.A plain
host:portparses fine. Everything else workerd does already copes with Docker Desktop on Windows:HostPortDocker publishes, on127.0.0.1, which Docker Desktop forwards to the Windows host;127.0.0.1(the same path the code comment describes for WSL with Docker Desktop).What I ran
Windows 11, Docker Desktop with "Expose daemon on tcp://localhost:2375 without TLS" turned on,
@cloudflare/vite-plugin1.67.0 with thewin32throw patched out, andWRANGLER_DOCKER_HOST=127.0.0.1:2375. Avite previewsession built the image, pulledcloudflare/proxy-everything, started the Durable Object's container and rendered 1,762 documents through it with no errors.Not tested:
wrangler devitself (same shared code, so I expect the same result), and container egress to the internet.Two more things that break on the way
tcp://is read as an IPv6 address. kj splits on colons: one colon meansipv4:port, more than one means a bare IPv6 address.tcp://127.0.0.1:2375has two, so it fails. The usualDOCKER_HOST=tcp://...form can't work with workerd on any OS. The scheme has to be dropped before the value reaches workerd.getNodeSocketPath(container-session.ts#L177) passes the value tohttp.request({ socketPath }). With a TCP host that becomes a pipe path that doesn't exist, so container session cleanup fails on any TCP engine.Proposed change
win32throw inprepareContainerImagesForDev.getContainerEngine, strip atcp://scheme before the value goes to workerd.WRANGLER_DOCKER_HOST=127.0.0.1:2375. This replaces "use WSL".removeSessionResourcestake either a socket path or ahost/portpair.The catch is that Docker Desktop's TCP daemon has no TLS, so any local process can drive Docker through it. It listens on loopback only, but you may not want to point people at it. Proper named pipe support in kj/workerd would avoid that, and the error message could switch to it once it exists.
I'm happy to send this as a PR if a maintainer is open to it.
This issue was written with help from an AI assistant (Claude); the test above ran on my machine.
workers-devprod commented on 2026-11-10:
Automated triage
Issue assessment
enhancement(high)windows(high)package:containers-shared(high)package:miniflare(medium)product:containers(medium)Actionability and missing information
Feature request to lift the Windows block on local container dev: reporter verified vite preview works over Docker Desktop's TCP daemon after patching the guard, and proposes stripping the Docker URL scheme plus host-port session cleanup; wrangler dev and container egress are untested.
Reproduction reason: The report is primarily a feature request to lift a Windows restriction; verifying it needs a Windows host with Docker Desktop's insecure TCP daemon enabled, and this assessment does not attempt reproduction.
Missing information:
This summary was generated by an LLM and may contain errors. Please verify its findings.
Triage bot commands and options
Repository collaborators with write or admin access can trigger actions by commenting on this issue:
@workers-devprod reproduce: Attempt to reproduce the issue using its description and recent comments.All reactions