Dev Containers tutorial

This tutorial walks you through running Visual Studio Code in a Docker container using the Dev Containers extension. You need no prior knowledge of Docker to complete this tutorial.

Running VS Code inside a Docker container can be useful for many reasons, but in this walkthrough we'll focus on using a Docker container to set up a development environment that is separate from your local environment.

Prerequisites

You need Visual Studio Code installed.

Install Docker

Docker is needed to create and manage your containers.

Docker Desktop

Download and install Docker Desktop, or an alternative Docker option, like Docker on a remote host or Docker compliant CLI.

Start Docker

Run the Docker Desktop application to start Docker. You will know it's running if you look in the activity tray and see the Docker whale icon.

Docker might take a few minutes to start. If the whale icon is animated, it is probably still in the process of starting. You can click on the icon to see the status.

Docker status

Check Docker

Once Docker is running, you can confirm that everything is working by opening a new terminal window and typing the command: