# Devcontainer

**Source:** https://promtable.com/glossary/devcontainer

> A devcontainer (`.devcontainer/devcontainer.json`) is the open spec for reproducible dev environments — defines base image, features, extensions, ports — used by GitHub Codespaces, VS Code Dev Containers, Gitpod, JetBrains Space.

---
A devcontainer (`.devcontainer/devcontainer.json`) is the open spec for reproducible dev environments — defines base image, features, extensions, ports — used by GitHub Codespaces, VS Code Dev Containers, Gitpod, JetBrains Space.

Devcontainers solve 'works on my machine' for development: the repo declares its dev environment (Docker image, language version, VS Code extensions, exposed ports), any IDE supporting the spec can spin up an identical environment. GitHub Codespaces popularized the pattern; VS Code Dev Containers, Gitpod, JetBrains Space, IntelliJ Code With Me support it. Configuration: `devcontainer.json` with image / Dockerfile reference, features (preinstalled tools — `node`, `python`, `aws-cli`), `forwardPorts`, `postCreateCommand`. Production benefits: every new dev gets identical environment in < 1 minute; CI can use the same container; switching machines is instant. By 2026 devcontainers are standard for serious OSS repos + many enterprise dev teams.

## When to use

- Any repo needing onboarding velocity.
- Open-source projects with diverse contributor environments.

## Common mistakes

- Heavy `postCreateCommand` — boot time bloats; bake into base image instead.
- Pinning to `latest` tags — non-reproducible.

## Related terms

- [browser-ide](https://promtable.com/glossary/browser-ide)
- [preview-deploy](https://promtable.com/glossary/preview-deploy)

## Sources

- [Devcontainer spec](https://containers.dev/)

*Last updated: 2026-06-01*
---

Original page: https://promtable.com/glossary/devcontainer
Maintained by Promtable (https://promtable.com). Content: CC BY 4.0. Cite as "Promtable — https://promtable.com/glossary/devcontainer".
Contact: info@vibecodingturkey.com.