Skip to content

Latest commit

 

History

History
 
 

.devcontainer

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Dev Container for developing Pants

This project provides a Development Container (or Dev Container for short) with a full-featured development environment containing all the tools, libraries, and runtimes needed to work with the Pants codebase. Here are some advantages of using dev containers:

  • Faster setup: Dev containers can be pre-built with all the necessary tools, libraries and runtimes, making setting up a new development environment faster. This is especially useful for new team members joining a project who can quickly get started without spending time setting up their development environment.
  • Portability: Dev containers provide portability between different platforms and clouds, allowing developers to write once and run anywhere. This ensures that developers can use the same development environment across different machines and platforms without compatibility issues.
  • Consistency: Dev containers provide a consistent development environment for all developers working on a project. This ensures that everyone is using the same tools, libraries and runtimes, reducing the chances of compatibility issues and making it easier to collaborate and reproduce bugs.
  • Isolation: Dev containers run in isolation from the host system, which improves security and reduces the chances of conflicts with other software installed on the host system.
  • Reproducibility: Dev containers can be version-controlled, making it easy to reproduce the development environment at any point in time. It also allows developers to roll back to an earlier environment version if necessary.

Features

Getting started

You need three (3) things to get started with development containers:

More on getting started can be found here.

Using the Dev Container

  1. After forking and cloning pantsbuild/pants, start VS Code and run the Dev Containers: Open Folder in Container... command from the Command Palette... (F1) and select the Pants project folder.
  2. The VS Code window (instance) will reload and start building the dev container. A progress notification provides status updates.
  3. After the build completes, VS Code will automatically connect to the container. You can now work with the repository source code in this independent environment.
  4. Pants sets up its development virtualenv at ~/.cache/pants/pants_dev_deps/<venv_fingerprint>.venv/. Point VS Code to the bin/python file in this folder by running the Python: Select Interpreter command from the Command Palette... (F1), and then Enter interpreter path.... You may need to restart your terminal. See Configure your IDE (optional).

More on starting a dev container can be found here.