# Devcontainers Devcontainers is the open specification (Microsoft-originated) that describes a development environment **as a file in the repo**: `devcontainer.json` declares the base image, tools, extensions, ports, and lifecycle commands, and any supporting tool can materialize an identical containerized workspace from it. Clone, reopen in container, work — the environment ships with the code. ## The pieces - **`devcontainer.json`** — the declaration, checked into the repository - **Features** — reusable, composable install units ("add Node 22", "add the GitHub CLI") pulled from OCI registries, so images stay thin and configs stay declarative - **Templates** — ready-made starting configurations per stack - **Supports**: VS Code, [[GitHub Codespaces]], DevPod, JetBrains, and the reference CLI ## Why it won It standardized the *description* layer and left the *execution* layer open. The same file drives a laptop container, a [[Cloud Development Environments (CDEs)|CDE]], a CI job, and — increasingly — an [[AI Agents|agent]] sandbox: [[WSL Container]] supports dev containers, [[Coder]] workspaces consume them, and giving an agent a devcontainer means giving it exactly the tools the repo declares and nothing else. Environment-as-code needs a lingua franca; this is it. ## References - [Containers.dev — the specification](https://containers.dev) ## Related - [[Cloud Development Environments (CDEs)]] — the category built on this spec - [[GitHub Codespaces]] · [[Coder]] — consumers - [[Docker]] · [[WSL Container]] — runtimes