Skip to content

Devcontainer

Configuration

Introduction

VS Code can be used together with Docker via the Remote - Containers extension to enable a container-based development environment.

As a remote-first, cross-platform development team, Compiler uses devcontainers to ease the onboarding and local development process for our engineering team, and to ensure our Open Source projects are widely accessible and easily reproducable for others.

The image

The devcontainer’s image is called compilerla/template-devcontainer.

Base

The image is based on python:3.11, to ease installation of common tooling like mkdocs and pre-commit.

Setup

Most setup is performed as the non-root $USER, with a default of compiler.

A home directory is created at /home/$USER and the working directory is set to /home/$USER/src.

Additional command-line tools included in the image:

  • curl
  • git
  • pip
  • wget

See the official python image on DockerHub for more.

Requirements

The .devcontainer/requirements.txt file lists PyPI packages installed by default into the devcontainer.

Extensions

The devcontainer/devcontainer.json file lists VS Code extensions installed with the devcontainer. These include: