Dev Containers
Specification for defining reproducible development environments in containers, eliminating 'works on my machine' problems and accelerating onboarding.
seed#devcontainers#docker#vscode#development#reproducibility#dx
What it is
Dev Containers is an open specification for defining development environments in Docker containers. A devcontainer.json file describes the complete environment: base image, editor extensions, tools, environment variables. Any developer can open the project and have the same environment in minutes.
Problem it solves
- "Works on my machine" → identical environment for everyone
- Days of onboarding → minutes of onboarding
- Version conflicts → isolation per project
- Manual setup → automated and versioned
Basic devcontainer.json
{
"name": "Node.js",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
"features": {
"ghcr.io/devcontainers/features/aws-cli:1": {}
},
"customizations": {
"vscode": {
"extensions": ["dbaeumer.vscode-eslint"]
}
},
"postCreateCommand": "npm install"
}Support
- VS Code (Dev Containers extension)
- GitHub Codespaces
- JetBrains (Gateway)
- DevPod (open source)
Features
Reusable components that add tools to the container:
- AWS CLI, Azure CLI, gcloud
- Node.js, Python, Go, Rust
- Docker-in-Docker
- Git, GitHub CLI
Why it matters
Devcontainers eliminate the "works on my machine" problem by defining the development environment as code. Every developer gets the same reproducible environment, with the correct tools and dependencies, without contaminating their local system.
References
- Dev Containers Specification — Official specification.
- Available Features — Feature catalog.
- Dev Container Specification — Dev Containers, 2024. Official format specification.