Dev Container Features
published to ghcr.io/zafnz/devcontainer-features.
| feature | installs |
|---|---|
| jqweb | jqweb, which turns JSON into an interactive webpage |
Add one to devcontainer.json:
"features": {
"ghcr.io/zafnz/devcontainer-features/jqweb:1": {}
}Each feature's options are in its README.md under src/.
src/<id>/devcontainer-feature.json describes a feature and
src/<id>/install.sh installs it, running as root during the image build with
each option as an upper-case environment variable. src/<id>/README.md is
generated by the release workflow from the JSON file and NOTES.md; edit
those two, not the README.
test/<id>/test.sh runs inside a container built with the feature and
test/<id>/scenarios.json names further container configurations, each with
a script of the same name.
npm install -g @devcontainers/cli
devcontainer features test -f jqweb -p .
That builds the feature onto the default base image, runs test/jqweb/test.sh
inside, and then does the same for each scenario. --base-image <image>
changes the image the autogenerated test uses. The test workflow runs both
on every push and pull request.
The release workflow runs on a push to main that changes src/, and on
demand. It publishes every feature whose version is not yet in the registry,
so publishing a change means raising the version in
devcontainer-feature.json. Features that install the latest release of their
tool at build time do not need a new version when the tool releases.
The workflow also regenerates src/*/README.md and opens a pull request when
that changed anything.