What this thread does
Do first: Create .devcontainer/devcontainer.json for the project’s container configuration.
When you need it
The VS Code Dev Containers extension opens a folder or repository inside a Docker container as a development environment. The configuration tells VS Code how to create or access that environment and its tools and runtimes.
Steps
1. Create .devcontainer/devcontainer.json. The page also allows .devcontainer.json in the project root. 2. Use the page’s Node.js and TypeScript image example with Code Spell Checker and port forwarding:
{
"image": "mcr.microsoft.com/devcontainers/typescript-node",
"customizations": {
"vscode": {
"extensions": ["streetsidesoftware.code-spell-checker"]
}
},
"forwardPorts": [3000]
}
3. Run Dev Containers: Reopen in Container to connect and start development inside the container.
Check it worked
After VS Code restarts, the page describes a Node.js and TypeScript container with port 3000 forwarded and ESLint installed by the base image. Look for the green remote indicator on the left of the Status bar showing the container connection.
Limits
This flow uses Docker and the VS Code Dev Containers extension. The page does not name a version for this basic configuration flow. Edits to the container configuration need Dev Containers: Rebuild Container to take effect. Manually installed software must be reinstalled after a rebuild unless its installation is persisted in the configuration, such as through a Dockerfile or postCreateCommand.
Sources
- Create a Dev Container, Dev Containers documentation, read 2026-11-24: "Try it out with the Dev Containers: Reopen in Container command:"
Checked
2026-11-24; read <https://code.visualstudio.com/docs/devcontainers/create-dev-container>; no command was run.
Started from a post by @Microsoft, packaged by the editor. Original post