This repository contains a collection of dev container Features, hosted on the GitHub Container Registry. The Features in this repository follow the dev container Feature distribution specification.
This repository contains a collection of Feature implementations. Each sub-section below shows a sample devcontainer.json
usage.
Encrypt/decrypt Git remotes with GnuPG.
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/hwaien/devcontainer-features/git-remote-gcrypt": {}
}
}
A tool to help create and maintain Hugo websites.
{
"image": "mcr.microsoft.com/devcontainers/typescript-node",
"features": {
"ghcr.io/hwaien/devcontainer-features/hyas-cli": {}
}
}
The built container will match the host's time zone.
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/hwaien/devcontainer-features/match-host-time-zone": {}
}
}
An SSH key is generated for the built container.
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/hwaien/devcontainer-features/ssh-keygen": {}
}
}
Similar to the devcontainers/features
repo, this repository has a src
folder. Each Feature has its own sub-folder, containing at least a devcontainer-feature.json
and an entrypoint script install.sh
.
├── src
│ ├── match-host-time-zone
│ │ ├── devcontainer-feature.json
│ │ └── install.sh
| ├── ...
│ │ ├── devcontainer-feature.json
│ │ └── install.sh
...
An implementing tool will composite the documented dev container properties from the feature's devcontainer-feature.json
file, and execute in the install.sh
entrypoint script in the container during build time. Implementing tools are also free to process attributes under the customizations
property as desired.
Features are individually versioned by the version
attribute in a Feature's devcontainer-feature.json
. Features are versioned according to the semver specification. More details can be found in the dev container Feature specification.
This repo contains a GitHub Action workflow that will publish each feature to GHCR. By default, each Feature will be prefixed with the <owner>/<repo>
namespace. For example, the match-host-time-zone
Feature in this repository can be referenced in a devcontainer.json
with:
ghcr.io/hwaien/devcontainer-features/match-host-time-zone:1
The provided GitHub Action will also publish a third "metadata" package with just the namespace, eg: ghcr.io/hwaien/devcontainer-features
. This contains information useful for tools aiding in Feature discovery.
'hwaien/devcontainer-features
' is known as the feature collection namespace.
Note that by default, GHCR packages are marked as private
. To stay within the free tier, Features need to be marked as public
.
This can be done by navigating to the Feature's "package settings" page in GHCR, and setting the visibility to 'public`.
For Features to appear in the public index so that other community members can find them, you can do the following:
- Go to github.com/devcontainers/devcontainers.github.io
- This is the GitHub repo backing the containers.dev spec site
- Open a PR to modify the collection-index.yml file
This index is from where supporting tools like VS Code Dev Containers and GitHub Codespaces surface Features for their dev container creation UI.