/devcontainer-features

A collection of Dev Container Features.

Primary LanguageShellMIT LicenseMIT

Development Container Features

devcontainers organization logo Development Container 'Features'
A set of simple and reusable Features. Quickly add a language/tool/CLI to a development container.

'Features' are self-contained units of installation code and development container configuration. Features are designed to install atop a wide-range of base container images (this repository focuses on debian based images).

Missing a CLI or language in your otherwise perfect container image? Add the relevant Feature to the features property of a devcontainer.json. A tool supporting the dev container specification is required to build a development container.

You may learn about Features at containers.dev, which is the website for the dev container specification.

Usage

To reference a Feature from this repository, add the desired Features to a devcontainer.json. Each Feature has a README.md that shows how to reference the Feature and which options are available for that Feature.

The example below installs the puppet feature declared in the ./src directory of this repository.

See the relevant Feature's README for supported options.

"name": "my-project-devcontainer",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",  // Any generic, debian-based image.
"features": {
    "ghcr.io/flokoe/devcontainer-features/puppet:1": {
        "version": "latest"
    }
}

Repo Structure

.
├── README.md
├── src
│   ├── puppet
│   │   ├── devcontainer-feature.json
│   │   └── install.sh
├── test
│   ├── puppet
│   │   └── test.sh
...
  • src - A collection of subfolders, each declaring a Feature. Each subfolder contains at least a devcontainer-feature.json and an install.sh script.
  • test - Mirroring src, a folder-per-feature with at least a test.sh script. The devcontainer CLI will execute these tests in CI.

Contributions

This repository will accept improvement and bug fix contributions related to the current set of maintained Features.