|
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 repo 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.
Once the proposed specification is accepted, implementation details will be published at https://containers.dev.
.
├── lib
| ├── settings.env
| ├── utils.sh
│ └── ...
├── README.md
├── src
│ ├── dotnet
│ │ ├── devcontainer-feature.json
│ │ └── install.sh
│ ├── go
│ │ ├── devcontainer-feature.json
│ │ └── install.sh
| ├── ...
│ │ ├── devcontainer-feature.json
│ │ └── install.sh
├── test
│ ├── dotnet
│ │ └── test.sh
│ └── go
│ | └── test.sh
| ├── ...
│ │ └── test.sh
├── test-scenarios
│ ├── install_jupyterlab.sh
│ ├── install_python_twice.sh
| ├── ...
│ └── scenarios.json
lib- A collection of tools, scripts, and shared configuration used generally by this repo's features.src- A collection of subfolders, each declaring a feature. Each subfolder contains at least adevcontainer-feature.jsonand the appropriately declared install script.test- Mirroringsrc, a folder-per-feature with at least atest.shscript. ThedevcontainerCLI will execute these tests in CI.test-scenarios- More complex scenarios involving a set of features from this repo. ThedevcontainerCLI will execute these tests in CI.
To reference a feature from this repository, add the desired features to a devcontainer.json.
The example below installs the go and docker-in-docker declared in the ./src directory of this repository.
See the relevant feature's README for supported options.
The @latest version annotation is added implicitly if omitted. To pin to a specific release tag, append it to the end of the feature.
features: {
"devcontainers/features/go@v0.0.2": {
"version": "1.18"
},The devcontainer CLI reference implementation (or a supporting tool) can be used to build a project's dev container declaring 'features'.
git clone <my-project-with-devcontainer>
devcontainer build --workspace-folder <path-to-my-project-with-devcontainer>This repository will accept improvement and bug fix contributions related to the current set of maintained features.
Please see the proposed specification on how to author and distribute features, as well as our GitHub Action, which serves as a reference implementation for the distribution portion of the specification.