Skip to content

Latest commit

 

History

History
49 lines (39 loc) · 2.98 KB

File metadata and controls

49 lines (39 loc) · 2.98 KB

← Back to Backlog

[SC-026] ✅ DONE - Add setup-devpod action to wsl-manager

Status: Done (2026-03-25) Priority: Medium Component: lib/wsl/commands.ps1, lib/wsl/manager.ps1

Summary: As a WSL user with Docker or Podman already installed, I want a setup-devpod command that installs DevPod inside my WSL distro and configures the correct container provider automatically.

Description: DevPod is an open-source, client-only dev environment manager that creates DevContainers on any infrastructure. Installing it inside WSL and wiring it to the existing container engine (Docker or Podman) completes the DevContainer story that wsl-manager already partially covers via setup-docker and setup-podman.

The command should:

  1. Install the DevPod CLI binary via the official curl-based install method
  2. Auto-detect whether Docker or Podman is available in the distro
  3. Add and activate the detected engine as the DevPod provider
  4. Fail gracefully if neither Docker nor Podman is installed (with a hint to run setup-docker or setup-podman first)

Acceptance Criteria:

  • wsl-manager setup-devpod installs the DevPod CLI binary in the target distro
  • Auto-detects Docker as provider when Docker is installed
  • Auto-detects Podman as provider when Podman is installed (and Docker is not)
  • Configures the detected provider via devpod provider add + devpod provider use
  • Fails with actionable message when neither container engine is found
  • Idempotent: re-running when DevPod is already installed skips installation
  • Interactive menu has a key binding for the new action
  • Unit tests cover detection logic and install flow
  • All existing tests continue to pass

Technical Notes:

  • Install method: curl -L -o devpod "https://github.com/loft-sh/devpod/releases/latest/download/devpod-linux-amd64" && sudo install -c -m 0755 devpod /usr/local/bin && rm -f devpod
  • Detection order: Docker first (command -v docker), then Podman (command -v podman)
  • Provider add: devpod provider add docker or devpod provider add podman
  • Provider use: devpod provider use docker or devpod provider use podman
  • For Podman, the provider may need the Podman socket path configured
  • Follows the same pattern as Invoke-SetupDocker / Invoke-SetupPodman in commands.ps1
  • SC-025 (automount metadata) should ideally be applied before this, as DevPod benefits from correct file permissions on Windows mounts

Follow-up Fix (2026-03-27, PR #59):

  • sudo bash strips environment variables (env_reset), causing curl to fail behind corporate proxies during DevPod/Docker/Podman installation
  • Fixed by running WSL scripts as normal user with sudo only for individual privileged commands, and moving env var definitions from ~/.bashrc to ~/.profile for login shell availability

Related:

  • SC-025 — automount metadata+umask (discovered during DevPod research)
  • SC-021 — .wslconfig defaults (global WSL settings)

← Back to Backlog