Repository navigation
Description
Feature request
Add a new wslc:// docker host transport so the plugin can talk to the Docker daemon that ships with WSL Containers (wslc, available in WSL 2.9.x and later, see https://learn.microsoft.com/windows/wsl/wsl-container).
Benefits: no more need to install podman or docker, only WSL !
Problem
Unlike Docker Desktop or Podman, WSL Containers exposes neither a Windows named pipe (//./pipe/docker_engine) nor a TCP port on the host. The Docker daemon runs inside the wslc virtual machine and is only reachable through a stdio bridge:
wslc system session run docker system dial-stdio
As a result, docker-maven-plugin cannot auto-detect or connect to a WSL Containers daemon today. On such a machine the connection detector falls through all existing providers and fails with:
No <dockerHost> given, no DOCKER_HOST environment variable,
no read/writable '/var/run/docker.sock' or '//./pipe/docker_engine' ...
Proposed solution
Introduce a wslc:// scheme, analogous to how DOCKER_HOST=ssh:// works: the transport spawns the bridge command above and lets Apache HttpClient drive its stdin/stdout as if it were an ordinary socket (one bridge process per HTTP connection, reused across requests via HTTP keep-alive).
Concretely:
- New transport (
wslc://) built on the existing
AbstractNativeClientBuilder/AbstractNativeSocketFactoryabstractions (same pattern as theunix://andnpipe://transports). A process-backedSocketbridges HttpClient todocker system dial-stdio. - Auto-detection: add a Windows-only provider that selects
wslc://when thewslcCLI is present. Priority is placed below the Docker/Podman named pipe, so an existing Docker Desktop / Podman endpoint always wins and wslc is only used as a fallback. New discovery order:- explicit
dockerHost DOCKER_HOSTenv var/var/run/docker.sock(Unix)//./pipe/docker_engine(Windows named pipe)wslc://if thewslcCLI is available (Windows) ← new
- explicit
- Executable override: the wslc executable can be pointed at a non-default location via the
WSLC_EXECUTABLEenvironment variable (kept out of the URL so Windows paths with spaces/backslashes don't have to survive URI parsing).
Notes / trade-offs
- Auto-detection probes with
wslc version(a cheap metadata call that does not start the container VM). It only checks that the CLI is present, so ifwslcis installed but no session/daemon is ready, wslc is still selected and the failure surfaces as a connection error at build time. - Like the named-pipe transport, the process-backed socket has no socket-level read timeout; a hung daemon blocks the read until the bridge process ends.
- There is an open change request against WSL itself microsoft/wsl#40976 that, if implemented, would have WSL Containers expose the Docker daemon through a host-visible endpoint (e.g. a Windows named pipe or TCP port) natively.
If/when that lands, thewslc://stdio-bridge proposed here becomes largely redundant: the daemon would be reachable through the plugin's existingnpipe://(ortcp://) transport and would be picked up by the current named-pipe auto-detection with no wslc-specific code path. In other words, this feature fills a gap that exists in today'swslcreleases; its usefulness will diminish once WSL provides a native endpoint.
PR
I have a working implementation (new wslc:// transport + auto-detection + unit tests + docs), PR assisted with Claude Code.
Activity
feat: add wslc:// transport for WSL Containers (fabric8io#1928)
feat: add wslc:// transport for WSL Containers (#1928)
feat(core): dial-stdio トランスポートと wslc:// endpoint を追加
Backfill 0.49.0 changelog entries for merged but undocumented changes
Backfill 0.49.0 changelog entries for merged but undocumented changes
Backfill 0.49.0 changelog entries for merged but undocumented changes