The Visual Studio Code Dev Containers extension lets you use a Docker container as a full-featured development environment. It allows you to open any folder or repository inside a container and take advantage of Visual Studio Code’s full feature set.
A devcontainer.json file in your project tells VS Code how to access (or create) a development container with a well-defined tool and runtime stack. This container can be used to run an application or to provide separate tools, libraries, or runtimes needed for working with a codebase.

# Path to creating a dev container
In this document, we’ll go through the steps for creating a development (dev) container in VS Code:
- Create a
devcontainer.json, which describes how VS Code should start the container and what to do after it connects.Make and persist changes to the dev container, such as installation of new software, through use of a Dockerfile.Configure multiple containers through Docker Compose.As you make changes, build your dev container to ensure changes take effect.After any of the steps above, you’ll have a fully functioning dev container, and you can either continue to the next step of this tutorial to add more features, or stop and begin working in the dev environment you currently have.
# System Requirements
Local / Remote Host:
You can use Docker with the Dev Containers extension in a few ways, including:
- Docker installed locally.Docker installed on a remote environment.Other Docker compliant CLIs, installed locally or remotely.
You can learn more in the alternative Docker options doc.
Below are some specific ways you can configure Docker on a local or remote host:
- Windows: Docker Desktop 2.0+ on Windows 10 Pro/Enterprise. Windows 10 Home (2004+) requires Docker Desktop 2.3+ and the WSL 2 back-end. (Docker Toolbox is not supported. Windows container images are not supported.)macOS: Docker Desktop 2.0+.Linux: Docker CE/EE 18.06+ and Docker Compose 1.21+. (The Ubuntu snap package is not supported.)Remote hosts: 1 GB RAM is required, but at least 2 GB RAM and a 2-core CPU is recommended.
Containers:
- x86_64 / ARMv7l (AArch32) / ARMv8l (AArch64) Debian 9+, Ubuntu 16.04+, CentOS / RHEL 7+x86_64 Alpine Linux 3.9+
Other glibc based Linux containers may work if they have needed Linux prerequisites.
More on Installation.
# devcontainer.json
| |
# Example with VSCode
Start CODING IN MINUTES with DevContainers - YouTube
# with Neovim
# Starting Devcontainers
Devpod seems to be able to start Devcontainers. It’s like Github Codespaces, but open-source.
See example in Workspaces.
Origin:
References:
Created 2023-03-15
