Skip to content

Feature: Native DevContainers Backend via Porthole/wslc #38

Description

@celloza

Summary

Add native VS Code DevContainers backend support so Porthole (wslc) can act as a Docker Desktop alternative for local containerized development workflows.

Problem

DevContainers are now a default development workflow in VS Code, but most setups implicitly depend on Docker Desktop as the runtime backend. This blocks developers who want a Windows-native wslc/Porthole-first workflow.

Proposal

  • Register Porthole as a valid DevContainers backend integration target.
  • Intercept or adapt DevContainer lifecycle operations to wslc session operations:
    • build/rebuild
    • create/start/stop
    • exec/attach
  • For workspace-open flow:
    • clone/open repo in VS Code
    • Porthole creates isolated wslc Session
    • workspace is mounted via virtiofs
    • IDE attaches into container seamlessly
  • Provide compatibility layer for common .devcontainer/devcontainer.json features:
    • image/Dockerfile builds
    • environment variables
    • forwarded ports
    • postCreate/postStart hooks

Sexy Factor

Porthole becomes a true daily-driver, drop-in backend replacement for .NET and web developers using DevContainers, without requiring Docker Desktop.

Integration Notes

  • Preserve Porthole App/Core/Tray boundaries and typed IPC contracts.
  • Keep Microsoft.WSL.Containers usage in tray/backend layers.
  • Minimize user-facing setup friction (ideally one-time backend registration).

Acceptance Criteria

  • User can open a repo with a valid .devcontainer config and choose Porthole backend.
  • DevContainer build + up completes using wslc session primitives.
  • Workspace mount via virtiofs works for file edits, watch tasks, and toolchains.
  • VS Code attach experience behaves equivalent to standard DevContainers flow.
  • Port forwarding and lifecycle hooks function for common scenarios.
  • Clear diagnostics shown for unsupported devcontainer.json features.

Out of Scope (initial cut)

  • 100% parity with every Docker-specific DevContainers edge case.
  • Non-VS Code IDE integrations.

Suggested Labels

enhancement, devcontainers, vscode, backend

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions