Skip to content

Support wslc (WSL Containers) as a Windows container runtime/frontend #602

Description

@gilescope

Use case

On Windows, EarthBuild runs buildkitd via Docker Desktop (or Docker Engine inside WSL2). Microsoft's wslc (WSL Containers) — native Linux container runtime announced at Build 2026, public preview ~end June 2026, shipping as a standard WSL update — runs OCI images in per-app lightweight VMs with no Docker Desktop. EarthBuild can't currently target it.

Expected behaviour

Add a wslc ContainerFrontend implementation, selectable via global.container_frontend — the same seam used for Podman (earthly#760) and proposed for apple/container (#385).

Notes

The runtime backend is already pluggable: util/containerutil/frontend.go defines the ~14-method ContainerFrontend interface (docker.go / podman.go shell impls). A new impl + frontend constant is the bulk of the work.

Unknowns to validate:

  • gRPC transport — does wslc expose a docker-container://-style connhelper, or do we go tcp://? Extend the scheme allowlist in shell_shared.go:parseAndValidateURL() either way.
  • Privileged buildkitd — wslc privileged-container support is undocumented; confirm buildkitd can boot.
  • Image load — new ImageLoadFromFileCommand variant.
  • EarthBuild already has WSL2 handling (builder.go:useSecondaryProxy() detects WSL2 + runs the socat proxy); check whether wslc's per-app-VM networking still needs it.

wslc ships a Docker-ish CLI (wslc.exe) + an SDK (wslcsdk.dll); OCI images; -p port mapping.

Alternatives

  • Docker Engine inside WSL2 already works today (no Docker Desktop needed) — this is the zero-code near-term path. wslc is the lighter, zero-install native option once GA.

Done when

  • Confirmed wslc buildkitd transport (connhelper vs TCP) and privilege support
  • wslc frontend implements ContainerFrontend
  • earthbuild bootstrap + a WITH DOCKER build pass on Windows with container_frontend = wslc
  • Docs note wslc version requirement

Sibling: apple/container macOS runtime — #385.

AI-assisted investigation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions