Skip to content
Proyek

Tentang

Devcontainer Studio: Build and Launch Reproducible Containerized Development Environments from devco

Produktivitas dan otomatisasi

Cara angka ini diukur

Yang dapat Anda lakukan

  • Deterministic feature resolution: OCI-distributed devcontainer features are resolved against a pinned lockfile committed alongside the configuration, so every machine converges on identical feature versions. Resolution failures surface as explicit errors rather than silent drift.
  • Lifecycle hook orchestration: onCreateCommand, updateContentCommand, postCreateCommand, and postStartCommand execute in defined order with per-hook timeouts, captured stdout/stderr, and non-zero exit propagation into the session log.
  • Port forwarding with conflict detection: Container ports map to host ports through a managed forwarding table. The manager probes active host listeners before binding and reports collisions at launch rather than at first connection attempt.
  • Backend abstraction layer: A single configuration surface targets Docker Desktop, Podman, or a WSL2 distro. The engine probe runs at startup, and build/run operations retry against an alternate detected backend when the primary socket fails to respond.

Pertumbuhan bintang terukur

dalam 24 jam
Mengumpulkan riwayat
dalam 7 hari
Mengumpulkan riwayat
dalam 15 hari
Mengumpulkan riwayat
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

Devcontainer Studio: Reproducible Containerized Development Environments for Windows

💻 PowerShell Installer

status installs platform rate ps


Devcontainer Studio is a Windows desktop application that resolves devcontainer.json definitions into running containers, then attaches editors, terminals, and port forwards to them. It parses schema v1 and v2 configurations, builds the referenced image or Dockerfile, applies features and mounts, and executes lifecycle hooks in order, all while keying environments by content hash so unchanged definitions rebuild from cache. The application layers build caching, volume mount policies, and engine failover across Docker Desktop, Podman, and WSL2 backends onto a container engine that is detected at first launch rather than bundled. A companion CLI exposes every GUI action for scripting and CI use, and diagnostic bundle export collects logs, resolved config, and engine state for support handoff.

🔧 Requirements

  • Windows 10 or Windows 11
  • PowerShell 5.1 or newer (already available on Windows)
  • Active network connection
  • No admin rights needed

Features

Content-addressed build caching: Devcontainer Studio computes a composite hash over devcontainer.json, the referenced Dockerfile, and the feature lockfile, then reuses cached layers whenever the hash is unchanged. Cold rebuild times drop materially on iterative workflows.

  • Deterministic feature resolution: OCI-distributed devcontainer features are resolved against a pinned lockfile committed alongside the configuration, so every machine converges on identical feature versions. Resolution failures surface as explicit errors rather than silent drift.

  • Lifecycle hook orchestration: onCreateCommand, updateContentCommand, postCreateCommand, and postStartCommand execute in defined order with per-hook timeouts, captured stdout/stderr, and non-zero exit propagation into the session log.

  • Port forwarding with conflict detection: Container ports map to host ports through a managed forwarding table. The manager probes active host listeners before binding and reports collisions at launch rather than at first connection attempt.

  • Backend abstraction layer: A single configuration surface targets Docker Desktop, Podman, or a WSL2 distro. The engine probe runs at startup, and build/run operations retry against an alternate detected backend when the primary socket fails to respond.

  • Workspace mount policy enforcement: Bind, volume, and copy mount modes are selectable per workspace root, with configurable performance hints for cross-filesystem scenarios on Windows hosts.

  • CLI surface parity: The bundled dcstudio helper exposes the same build, launch, port, and diagnostic operations available in the GUI, enabling scripted and CI-driven environment provisioning without GUI interaction.

  • Structured diagnostic export: A single action collects session logs, the fully resolved configuration, feature lockfile state, and engine probe results into an archive suitable for support escalation or post-mortem review.

  • Machine-wide policy controls: Administrators can pin engine backends, cap cache sizes, and restrict update channels through a read-only policy file under %PROGRAMDATA%, with user-level settings layered beneath.

  • Template library: Starter devcontainer definitions ship with the installer and can be cloned into a workspace as a baseline, then modified without affecting the originals.

How it works

Devcontainer Studio resolves a devcontainer.json definition into a running, reproducible environment through a deterministic pipeline. The application reads the configuration, computes a content hash over the definition and its referenced Dockerfile, feature lockfile, and mount declarations, then compares that hash against the local build cache. When the hash matches an existing entry, the cached image is reused and startup proceeds directly to launch; when it differs, the build stage runs to completion and the resulting image is recorded under the new hash.

Build execution follows the declared image or Dockerfile, applies resolved OCI features in lockfile order, and materializes workspace mounts according to the configured bind, volume, or copy policy. Layer caching is preserved across builds so that unchanged stages are not rebuilt. Once the image is ready, the lifecycle hook runner executes onCreateCommand, updateContentCommand, postCreateCommand, and postStartCommand sequentially, capturing output from each stage and enforcing the per-hook timeout before advancing.

Launch attaches the environment to the Studio window over a local attach socket, opens the workspace terminal, and registers the port forwarding table with conflict detection against active host listeners. Environments are keyed by content hash throughout, so two machines resolving the same definition produce identical toolchains without manual reconciliation. Every GUI action is mirrored by the dcstudio command-line interface, allowing the same pipeline to run unattended in scripting and automation contexts, with exit codes and machine-readable output available for downstream tooling.

Compatibility

Devcontainer Studio targets Windows 21H2 (build 19044) and later, with Windows 23H2 or newer recommended for full feature parity. The application runs on x64 hardware with SLAT support; a minimum of 2 cores and 8 GB RAM is sufficient for single-container workspaces, while 4 cores and 16 GB RAM (32 GB for multi-container stacks) is advised for parallel builds and compose-based definitions. A display of 1280x720 is the floor, with 1920x1080 and GPU acceleration recommended for the container and port panels. Storage requirements start at GB on the system volume, though 60 GB on an SSD accommodates image layers and the content-hash build cache comfortably.

Container engine support spans Docker Desktop 4.28 and newer, Podman 4.9 and newer, and WSL2 distributions with systemd enabled. Engine backends are detected at first launch rather than bundled, and the engine.backend setting accepts auto, docker, podman, or wsl2; in auto mode the application probes in that order and fails over to an alternate detected backend when the primary socket is unresponsive. WSL2-backed configurations benefit from systemd initialization in the target distribution, and the shim integrates with WSL2 distros that expose a working container runtime. Legacy Windows hosts without WSL2 can fall back to a Hyper-V-backed Docker Desktop installation, at the cost of longer cold builds and higher idle memory.

Schema compatibility covers devcontainer.json definitions at schema v1 and v2, including compose-based configurations that reference a dockerComposeFile key and OCI-distributed feature sources resolved into a reproducible lockfile. Workspace mount policies support bind, volume, and copy modes with configurable performance hints, and lifecycle hooks (onCreateCommand, updateContentCommand, postCreateCommand, postStartCommand) execute in order under a configurable per-hook timeout. Port forwarding maps container ports to host ports with conflict detection against active listeners, and service-qualified forwards are accepted for multi-container stacks. Every GUI action is exposed through the dcstudio CLI for scripting and CI use, with json and text output formats available for machine consumption.

FAQ

Does Devcontainer Studio support multi-container devcontainer configurations?

Yes. Compose-based devcontainer.json files that declare a dockerComposeFile key are resolved and launched as a service stack. Each service appears in the containers panel, and the -port flag accepts service-qualified forwards such as web:3000:3000 so traffic can be routed to a specific member of the stack.

Can feature versions be pinned for a team?

The application writes a feature lockfile to the cache directory after every successful resolution. Commit that lockfile alongside devcontainer.json and set features.lockfileMode to strict in settings.json. In strict mode, resolution fails rather than drifting when the lockfile is present, keeping every machine on the same feature set.

How does the application behave on machines without a container engine installed?

At first launch it probes for Docker Desktop, Podman, and a WSL2 distro with a supported engine. If none are detected, the GUI opens the engine setup panel and the CLI exits with code 3. No engine is bundled and none is installed silently; the user or administrator supplies the backend.

Is an account or license key required to run it?

No account or license key is needed. The installer provisions the Studio GUI, the dcstudio CLI helper, WSL2 integration shim, and starter templates, and all documented features are available to every installation. Distribution terms are covered in the License section.

Can the CLI replicate every GUI action for CI pipelines?

Yes. Every GUI operation has a dcstudio counterpart, and -output json|text produces machine-readable results suitable for pipeline steps. Exit codes are stable and documented, so build scripts can branch on specific failure classes rather than parsing log text.

Which engine backend should be selected?

auto probes Docker Desktop, Podman, then WSL2 in order and is the correct default for most machines. Choose podman for rootless, daemonless setups; wsl2 for single-container developer laptops where low idle memory and fast start matter; and Docker Desktop with the Hyper-V backend only for legacy Windows hosts without WSL2.

How does the build cache decide when to rebuild?

Environments are keyed by a content hash over devcontainer.json, the referenced Dockerfile, and the feature lockfile. When all three hashes match the cached entry, the build stage is skipped and the existing image is reused. -rebuild forces a full rebuild and -no-cache disables the layer cache for that invocation.

What is included in a diagnostic bundle?

-export-diag or the corresponding GUI action collects rotating session logs, the fully resolved configuration, lifecycle hook output, engine state, and backend probe results into a zip for support handoff. Telemetry is opt-in and, when enabled, transmits only anonymous build timing and failure codes.

Does it work with existing devcontainer.json files without modification?

Schema v1 and v2 definitions are parsed directly, including features, mounts, and lifecycle hooks. Local customization is layered through settings.json and keybindings.json under %APPDATA%, while machine-wide overrides are read from policies.json under %PROGRAMDATA%, so shared repositories keep their canonical configuration.

How are lifecycle hook failures surfaced?

Hooks run in sequence (onCreateCommand, updateContentCommand, postCreateCommand, postStartCommand) with captured output written to the logs directory. A hook that exceeds hooks.timeoutSeconds is terminated and the CLI exits with code 4; per-run overrides are available through -hook-timeout for slow package installs.

Disclaimer

Devcontainer Studio is provided as a tool for building and launching containerized development environments from devcontainer.json definitions on Windows. It is supplied on an "as is" basis, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement.

Containerized environments execute code with the privileges granted to the underlying container engine. You are responsible for reviewing every devcontainer.json, Dockerfile, feature source, and lifecycle hook before launching an environment, and for ensuring that definitions originate from trusted sources. Devcontainer Studio resolves and executes configuration content authored by you or your team; it does not audit, sandbox, or restrict the commands those definitions contain.

Engine backends are detected at first launch and are not bundled with the application. Behavior of Docker Desktop, Podman, and WSL2 distros is governed by their respective vendors, and Devcontainer Studio makes no guarantees regarding engine-specific limits, licensing terms, or upstream schema changes. Content-hashed rebuilds and feature lockfiles are designed to improve reproducibility but do not eliminate drift caused by upstream image or registry changes.

In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software. Diagnostic bundle export collects logs, resolved configuration, and engine state for support handoff; review bundle contents before sharing them outside your organization.

Devcontainer Studio is an independent product and is not affiliated with the owners of Docker, Podman, Windows, or WSL2. All trademarks remain the property of their respective owners.

License

Devcontainer Studio is distributed under the MIT License, a permissive, OSI-approved license that grants unrestricted use, modification, and redistribution of the software in source and binary forms, subject to retention of the copyright notice and the license text. The full license terms ship with every build and are reproduced in the LICENSE file at the root of the distribution.

Under these terms, teams may deploy Devcontainer Studio across any number of workstations and CI runners, embed the dcstudio CLI helper in internal automation pipelines, and adapt the starter devcontainer templates to their own base images without additional authorization. Redistributions of modified builds must preserve the original copyright attribution and include a copy of the license; derivative works may be relicensed only insofar as the MIT terms permit.

The software is provided on an "as is" basis, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability arising from, out of, or in connection with the software or its use.

Third-party components bundled with Devcontainer Studio, including the container engine integration shims and the devcontainer specification parser, remain governed by their respective licenses, which are enumerated in the THIRD-PARTY-NOTICES file included with the installer. Engine backends such as Docker Desktop, Podman, and WSL2 are detected at runtime and are not distributed with this product; their licensing terms apply independently and are the responsibility of the deploying organization to review.

No confidentiality, support, or indemnification obligations are created by this license. Organizations requiring those assurances should establish a separate commercial agreement with the maintainers.

Jelajahi proyek terkait

Memuat…