explaingit

microsoft/vscode-dev-containers

4,744ShellAudience · developerComplexity · 2/5Setup · easy

TLDR

A now-archived collection of ready-made setup templates for running your project inside a Docker container with VS Code or GitHub Codespaces. Migrated to the devcontainers org in 2023.

Mindmap

mindmap
  root((repo))
    What it does
      Dev container templates
      VS Code integration
      GitHub Codespaces
    How it works
      devcontainer.json config
      Docker container
      Auto language setup
    Key Benefit
      Same env any machine
      No local installs
      Browser-based coding
    Status
      Archived 2023
      Migrated to devcontainers org
      Read-only reference
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Bootstrap a containerised development environment for a common tech stack without writing Docker config from scratch.

USE CASE 2

Share a consistent coding environment with a team so every contributor gets the same tools and extensions automatically.

USE CASE 3

Use GitHub Codespaces to work on a project from a browser without installing anything on your local machine.

USE CASE 4

Learn how devcontainer.json files are structured to build your own custom dev container template.

Tech stack

DockerShelldevcontainer.jsonVS Code

Getting it running

Difficulty · easy Time to first run · 30min

This repo is archived. For current templates visit the devcontainers GitHub org. Drop devcontainer.json into your project root and reopen in VS Code.

Open source Microsoft project. No active license changes, archived repo.

In plain English

This repository was a collection of ready-made configuration templates for setting up development containers with Visual Studio Code and GitHub Codespaces. It is now archived and no longer active. The contents were migrated in late 2023 to a new home under the devcontainers GitHub organization. A development container is a pre-configured environment that runs inside a container tool like Docker. The idea is that a developer opens a project folder in VS Code and VS Code automatically sets up the correct programming language, tools, and extensions inside a container, so the project works the same way on any machine. GitHub Codespaces takes the same concept to the cloud, letting someone work from a browser without installing anything locally. The templates in this repository gave developers a starting point for many common technology stacks. Each template included a configuration file called devcontainer.json that described which container image to use, how to start it, and which VS Code extensions to install. A developer could pick a template, drop the files into their project folder, and have a working containerized environment in minutes. Because this repository is archived, no new templates or fixes are accepted here. People looking for current templates should visit the devcontainers organization directly, and those who want to publish their own templates can use the quick-start repositories mentioned in the migration announcement.

Copy-paste prompts

Prompt 1
I want to set up a VS Code dev container for a Python project. Based on the devcontainer.json format used in vscode-dev-containers, show me a starter config that includes Python 3.11 and the Pylance extension.
Prompt 2
Explain what each field in a devcontainer.json file does, I want to understand how to customise a dev container template for my Node.js project.
Prompt 3
How do I take a dev container template from the devcontainers org (the migration target of vscode-dev-containers) and add it to my existing GitHub repo so Codespaces works out of the box?
Prompt 4
I have a team of 5 developers on different OSes. Show me how to use a dev container config so everyone gets the same Python environment with the same linter and formatter installed automatically.
Prompt 5
What is the difference between using VS Code dev containers locally with Docker versus opening the same config in GitHub Codespaces?
Open on GitHub → Explain another repo

← microsoft on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.