Skip to content

Instantly share code, notes, and snippets.

@khalidx
Created December 2, 2022 09:45
Show Gist options
  • Save khalidx/f32a1515043c11d6fb94666aa2b7582d to your computer and use it in GitHub Desktop.
Save khalidx/f32a1515043c11d6fb94666aa2b7582d to your computer and use it in GitHub Desktop.
A VSCode DevContainers configuration for dockerized development.

VSCode DevContainers are way better than installing tools locally and coding on your machine; it prevents tool clutter, and ensures your project is portable across your team.

For Node.js / JavaScript / TypeScript development, just create a .devcontainer/devcontainer.json file at the top-level in your workspace with the following contents:

{
  "name": "Node.js & TypeScript",
  "image": "mcr.microsoft.com/devcontainers/typescript-node:18-bullseye"
}

Containers for other languages can be configured by typing "Dev Containers: Add Dev Container Configuration Files" in the VSCode command palette dropdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment