A new contributor clones the repository on a Monday morning. The source matches everyone else's checkout; the machine does not. One workstation has the right runtime, another has a version left over from an older project, and the first defect report of the day is really an environment report. Nothing in the code changed. The setup path did.

What a dev container actually defines

The open specification site defines a development container as a container used as a complete development environment. It can run the application, isolate the tools, libraries and runtimes a codebase needs, and assist continuous integration and testing. Such an environment can run locally or remotely, on private or public cloud infrastructure. That breadth is deliberate: one definition is meant to serve both the editor and the pipeline.

The specification tries to enrich existing container formats with a common set of development settings, tools and configuration while keeping a simplified single-container option. Features and Templates exist to share and reuse setup steps. The intent is less about promoting a particular product and more about giving an environment a portable description.

The supporting page is more precise about the file at the center of this. A devcontainer.json in a project tells tools and services that support the specification how to access or create a development container with a clearly defined tool and runtime stack. The Dev Container CLI is the reference implementation. It reads that file, creates and configures the container, supports prebuilding container configurations in CI systems such as GitHub Actions, and applies Features and lifecycle scripts such as postCreateCommand when the container runs. The site positions this as more capable than a plain build command followed by a run command.

One caution about sources belongs here. The site also relays third-party claims, such as a client tool that creates reproducible developer environments from devcontainer.json on any backend. That is the specification site describing another product, not a neutral benchmark, and the distinction should stay visible.

Setup concernMechanism named by the sourcesWhat survives a move to another machine
Tool and runtime versionsdevcontainer.json checked into the repositoryThe same tools, extensions and settings
Dependency installationpostCreateCommand lifecycle scriptRuns during container creation
Leftover local stateRebuild deletes and recreates the containerTerminal history does not carry over
Prebuilt environmentsDev Container CLI with CI prebuildThe same definition reused outside the editor

The first day is observable

Microsoft's vendor documentation adds a concrete property: the devcontainer.json is checked into the repository, so everybody opening the project receives the same tools, extensions and settings regardless of what is installed on the local machine. Its stated prerequisites are WSL 2, Docker Desktop with the WSL 2 backend, Visual Studio Code and the Dev Containers extension. Those are product details of one toolchain, not a cross-platform requirement.

The same page draws a performance boundary. Project files belong on the WSL 2 filesystem, where input and output are native to Linux; sharing files with the Windows filesystem is noticeably slower. Visual Studio Code builds the image from .devcontainer/devcontainer.json and reconnects. Again, this is one vendor's implementation advice rather than a universal rule.

A Microsoft Learn exercise makes the dependency step concrete. Setting postCreateCommand to a dependency-installing command installs dependencies automatically when the container is created. Rebuilding deletes the container and builds it again from scratch, and terminal history is not preserved. The exercise frames the goal as developers working with no setup steps, opening the project and immediately running the code. Extensions can be written into the extensions section through an add-to-configuration action.

What the mechanisms prove

Two points deserve care. First-day experience is a useful writing angle because the steps are observable: define the environment, create it, install dependencies, run the project. The sources describe mechanisms and offer no named metric or hour count, so such a figure has no place in an argument built on them.

Similarly, the gap between a local container and a clean CI environment is a plausible source of surprises, especially given that a rebuild drops local state. The sources supply no defect rate, so the point stays qualitative.

devcontainer.json also stops short of a reproducible build. Matching tools, extensions and settings describe an environment. Whether the resulting artifacts are byte-identical belongs to a different conversation, especially if the build itself carries nondeterminism.

Closing

The strongest argument for writing the setup into the repository is practical. The file becomes reviewable, versioned and reusable by a pipeline. When one definition drives a laptop and a CI job, discussion of a broken build starts from a shared baseline. Local opinions stop being the entry point. Projects with a shared runtime, Cross Mini App among them, get that baseline almost for free once the setup script is treated as deliverable code.

Sources