- Agents get a reproducible environment to execute commands, run tests, and iterate
- New team members start an environment and immediately have everything they need
- Everyone works in the same setup, no more “it works on my machine”
Create your first Dev Container
Create a.devcontainer/devcontainer.json file in your repository:
- Node.js 20 with npm
- Docker available inside the environment
- ESLint and Prettier extensions
- Dependencies installed automatically
Run tasks on startup
For more control over startup behavior, use Tasks & Services:Verify it works
Once your environment starts, verify the setup. These examples assume a Node.js project. Substitute your own project’s commands:Next steps
- Optimize startup times with prebuilds and image caching
- Dev Container reference for advanced configuration: multi-container setups, private images, elevated privileges
- Teach agents your codebase so they understand your conventions