From f01e94905140b05eee0ba31fb692b2189a482340 Mon Sep 17 00:00:00 2001 From: thediveo Date: Tue, 26 May 2026 14:11:29 +0000 Subject: [PATCH 01/13] fix: registry pulling w/ direct imgref Signed-off-by: thediveo --- src/pull-through-cache-registry/devcontainer-feature.json | 2 +- src/pull-through-cache-registry/install.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pull-through-cache-registry/devcontainer-feature.json b/src/pull-through-cache-registry/devcontainer-feature.json index 9e5557d..7056bc3 100644 --- a/src/pull-through-cache-registry/devcontainer-feature.json +++ b/src/pull-through-cache-registry/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "OCI registry pull-through cache to mirror rate-limited upstream registries, such as Docker Hub", "id": "pull-through-cache-registry", - "version": "0.2.0", + "version": "0.2.1", "description": "Deploys a devcontainer-local CNCF Distribution Registry configured as a pull-through cache for the local docker-in-docker", "documentationURL": "https://github.com/thediveo/devcontainer-features/blob/master/src/registry-pull-through-cache/README.md", "options": { diff --git a/src/pull-through-cache-registry/install.sh b/src/pull-through-cache-registry/install.sh index 4b582d0..20c340b 100755 --- a/src/pull-through-cache-registry/install.sh +++ b/src/pull-through-cache-registry/install.sh @@ -38,7 +38,9 @@ if docker ps -a --format '{{.Names}}' | grep -q "^\${REGISTRY_NAME}$"; then docker start "\${REGISTRY_NAME}" else echo "running pull-through cache registry container" + docker pull registry-1.docker.io/library/registry:3 docker run -d \ + --pull never \ --restart always \ --name "\${REGISTRY_NAME}" \ -p \${PORT}:5000 \ @@ -47,7 +49,7 @@ else -e REGISTRY_HTTP_DEBUG= \ -e REGISTRY_LOG_LEVEL=info \ -e OTEL_TRACES_EXPORTER=none \ - registry:3 + registry-1.docker.io/library/registry:3 fi echo "pull-through cache registry started" EOF From 6a25019c9347802028537b085ea08ba0946786b5 Mon Sep 17 00:00:00 2001 From: thediveo Date: Tue, 26 May 2026 19:33:07 +0000 Subject: [PATCH 02/13] fix: upgrade devcontainer config deps Signed-off-by: thediveo --- .devcontainer/devcontainer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index cf2cdbc..24d7369 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,10 +1,10 @@ { "name": "TheDiveO's devcontainer features", - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { - "ghcr.io/devcontainers/features/node:1": {}, + "ghcr.io/devcontainers/features/node:2": {}, "./devcontainers-cli": {}, - "ghcr.io/devcontainers/features/docker-in-docker:2": { + "ghcr.io/devcontainers/features/docker-in-docker:3": { "version": "latest", "moby": false // go for the upstream Docker-CE }, From 1bd35e9e39fa00418db5286f1dccb964528b14c7 Mon Sep 17 00:00:00 2001 From: thediveo Date: Tue, 26 May 2026 20:02:14 +0000 Subject: [PATCH 03/13] refact: gocover with soft dependency on Go only Signed-off-by: thediveo --- src/gocover/NOTES.md | 23 ++++++++++++++++--- src/gocover/README.md | 27 ++++++++++++++++++----- src/gocover/devcontainer-feature.json | 14 +++++------- src/pull-through-cache-registry/README.md | 6 +++++ test/gocover/{test.sh => default.sh} | 0 test/gocover/scenarios.json | 19 ++++++++++++---- 6 files changed, 69 insertions(+), 20 deletions(-) rename test/gocover/{test.sh => default.sh} (100%) diff --git a/src/gocover/NOTES.md b/src/gocover/NOTES.md index 49633e3..9e85357 100644 --- a/src/gocover/NOTES.md +++ b/src/gocover/NOTES.md @@ -1,3 +1,9 @@ +## Feature Dependency + +This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so +that you have full control over from where and how you bring in the go +toolchain. + ## `gocover` Command This feature installs a new `gocover` command into `/usr/local/bin`. @@ -6,14 +12,25 @@ When run without any flags and arguments, `gocover` will run the unit tests using `go test` on all packages in the Go module in the workspace, and update the `README.md` file with a badge showing the coverage percentage. -### CLI Flags +For example: + +```json +{ + "features": { + "ghcr.io/devcontainers/features/go:1": {}, + "gocover:1": {} + } +} +``` + +### `gocover` CLI Flags | Flag | Meaning | | --- | --- | | `-r`, `-root`, `--root` | run tests additionally also as root. | -| `-noroot`, `--no-root` | don't run tests also as root, even if feature was configured with root=true. | +| `-noroot`, `--no-root` | don't run tests also as root, even if this feature was configured with `root`:`true`. | | `-html`, `--html` | additionally generate `coverage.html` | -| `-nohtml`, `--no-html` | don't generate `coverage.html, even if feature was configured with html=true. | +| `-nohtml`, `--no-html` | don't generate `coverage.html`, even if this feature was configured with `html`:`true`. | ### Positional Arguments diff --git a/src/gocover/README.md b/src/gocover/README.md index c2e23d2..daaaa98 100644 --- a/src/gocover/README.md +++ b/src/gocover/README.md @@ -1,13 +1,13 @@ # Go Coverage with Badge (gocover) -runs Go unit tests with coverages, updating the README.md with a coverage badge. +a gocover command to run Go unit tests with coverages, updating the README.md with a coverage badge. ## Example Usage ```json "features": { - "ghcr.io/thediveo/devcontainer-features/gocover:0": {} + "ghcr.io/thediveo/devcontainer-features/gocover:1": {} } ``` @@ -26,6 +26,12 @@ runs Go unit tests with coverages, updating the README.md with a coverage badge. | green | percentage number for the badge to become green | string | 80 | | yellow | percentage number for the badge to become yellow | string | 50 | +## Feature Dependency + +This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so +that you have full control over from where and how you bring in the go +toolchain. + ## `gocover` Command This feature installs a new `gocover` command into `/usr/local/bin`. @@ -34,14 +40,25 @@ When run without any flags and arguments, `gocover` will run the unit tests using `go test` on all packages in the Go module in the workspace, and update the `README.md` file with a badge showing the coverage percentage. -### CLI Flags +For example: + +```json +{ + "features": { + "ghcr.io/devcontainers/features/go:1": {}, + "gocover:1": {} + } +} +``` + +### `gocover` CLI Flags | Flag | Meaning | | --- | --- | | `-r`, `-root`, `--root` | run tests additionally also as root. | -| `-noroot`, `--no-root` | don't run tests also as root, even if feature was configured with root=true. | +| `-noroot`, `--no-root` | don't run tests also as root, even if this feature was configured with `root`:`true`. | | `-html`, `--html` | additionally generate `coverage.html` | -| `-nohtml`, `--no-html` | don't generate `coverage.html, even if feature was configured with html=true. | +| `-nohtml`, `--no-html` | don't generate `coverage.html`, even if this feature was configured with `html`:`true`. | ### Positional Arguments diff --git a/src/gocover/devcontainer-feature.json b/src/gocover/devcontainer-feature.json index 2e0e7c7..b0aebce 100644 --- a/src/gocover/devcontainer-feature.json +++ b/src/gocover/devcontainer-feature.json @@ -1,8 +1,9 @@ { "name": "Go Coverage with Badge", "id": "gocover", - "version": "0.1.4", - "description": "runs Go unit tests with coverages, updating the README.md with a coverage badge.", + "version": "1.0.0", + "description": "a gocover command to run Go unit tests with coverages, updating the README.md with a coverage badge.", + "keywords": ["go", "coverage", "badge"], "options": { "root": { "type": "boolean", @@ -55,10 +56,7 @@ "description": "percentage number for the badge to become yellow" } }, - "dependsOn": { - "ghcr.io/devcontainers/features/go:1": { - "version": "latest", - "golangciLintVersion": "latest" - } - } + "installsAfter": [ + "ghcr.io/devcontainers/features/go" + ] } \ No newline at end of file diff --git a/src/pull-through-cache-registry/README.md b/src/pull-through-cache-registry/README.md index 3d1f7b9..e001650 100644 --- a/src/pull-through-cache-registry/README.md +++ b/src/pull-through-cache-registry/README.md @@ -33,6 +33,12 @@ In the best tradition of [dogfooding](https://en.wikipedia.org/wiki/Eating_your_own_dog_food) we use this feature to develop our features. +## Important + +- this feature depends on `ghcr.io/devcontainers/features/docker-in-docker:3`. +- at this time, it needs to set the docker-in-docker configuration parameter + `moby` to `false` in order to work on Debian 13 as well as Ubuntu 26.04. + ## OS Support As this feature relies on the [Docker-in-Docker diff --git a/test/gocover/test.sh b/test/gocover/default.sh similarity index 100% rename from test/gocover/test.sh rename to test/gocover/default.sh diff --git a/test/gocover/scenarios.json b/test/gocover/scenarios.json index 7efe26d..98d296b 100644 --- a/test/gocover/scenarios.json +++ b/test/gocover/scenarios.json @@ -1,31 +1,42 @@ { + "default": { + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "gocover": {}, + "ghcr.io/devcontainers/features/go:1": {} + } + }, "root": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { + "ghcr.io/devcontainers/features/go:1": {}, "gocover": { "root": true } } }, "html": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { + "ghcr.io/devcontainers/features/go:1": {}, "gocover": { "html": true } } }, "nonverbose": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { + "ghcr.io/devcontainers/features/go:1": {}, "gocover": { "verbose": false } } }, "yellow": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { + "ghcr.io/devcontainers/features/go:1": {}, "gocover": { "yellow": "60" } From aa3ef7a49441d90ed2374ef985a49841c6f569c8 Mon Sep 17 00:00:00 2001 From: thediveo Date: Tue, 26 May 2026 20:25:04 +0000 Subject: [PATCH 04/13] refact: goreportcard with soft dependency on Go only Signed-off-by: thediveo --- TESTING.md | 2 +- src/gocover/NOTES.md | 16 ++++++++-------- src/gocover/README.md | 16 ++++++++-------- src/goreportcard/NOTES.md | 17 +++++++++++++++++ src/goreportcard/README.md | 19 ++++++++++++++++++- src/goreportcard/devcontainer-feature.json | 11 ++++------- test/goreportcard/{test.sh => default.sh} | 0 test/goreportcard/scenarios.json | 9 +++++++++ 8 files changed, 65 insertions(+), 25 deletions(-) rename test/goreportcard/{test.sh => default.sh} (100%) create mode 100644 test/goreportcard/scenarios.json diff --git a/TESTING.md b/TESTING.md index 68b366d..09491d2 100644 --- a/TESTING.md +++ b/TESTING.md @@ -5,7 +5,7 @@ To test a particular devcontainer feature, say, `lazygit`: ```bash -devcontainer features test -f lazygit -i mcr.microsoft.com/devcontainers/base:ubuntu -p . +devcontainer features test -f lazygit --skip-autogenerated -i mcr.microsoft.com/devcontainers/base:ubuntu -p . ``` - `--skip-scenarios` ... tests only the `test.sh` test case, but no scenario tests. diff --git a/src/gocover/NOTES.md b/src/gocover/NOTES.md index 9e85357..c86849f 100644 --- a/src/gocover/NOTES.md +++ b/src/gocover/NOTES.md @@ -4,14 +4,6 @@ This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so that you have full control over from where and how you bring in the go toolchain. -## `gocover` Command - -This feature installs a new `gocover` command into `/usr/local/bin`. - -When run without any flags and arguments, `gocover` will run the unit tests -using `go test` on all packages in the Go module in the workspace, and update -the `README.md` file with a badge showing the coverage percentage. - For example: ```json @@ -23,6 +15,14 @@ For example: } ``` +## `gocover` Command + +This feature installs a new `gocover` command into `/usr/local/bin`. + +When run without any flags and arguments, `gocover` will run the unit tests +using `go test` on all packages in the Go module in the workspace, and update +the `README.md` file with a badge showing the coverage percentage. + ### `gocover` CLI Flags | Flag | Meaning | diff --git a/src/gocover/README.md b/src/gocover/README.md index daaaa98..6bab234 100644 --- a/src/gocover/README.md +++ b/src/gocover/README.md @@ -32,14 +32,6 @@ This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so that you have full control over from where and how you bring in the go toolchain. -## `gocover` Command - -This feature installs a new `gocover` command into `/usr/local/bin`. - -When run without any flags and arguments, `gocover` will run the unit tests -using `go test` on all packages in the Go module in the workspace, and update -the `README.md` file with a badge showing the coverage percentage. - For example: ```json @@ -51,6 +43,14 @@ For example: } ``` +## `gocover` Command + +This feature installs a new `gocover` command into `/usr/local/bin`. + +When run without any flags and arguments, `gocover` will run the unit tests +using `go test` on all packages in the Go module in the workspace, and update +the `README.md` file with a badge showing the coverage percentage. + ### `gocover` CLI Flags | Flag | Meaning | diff --git a/src/goreportcard/NOTES.md b/src/goreportcard/NOTES.md index 05904d8..37ca424 100644 --- a/src/goreportcard/NOTES.md +++ b/src/goreportcard/NOTES.md @@ -1,3 +1,20 @@ +## Feature Dependency + +This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so +that you have full control over from where and how you bring in the go +toolchain. + +For example: + +```json +{ + "features": { + "ghcr.io/devcontainers/features/go:1": {}, + "goreportcard:1": {} + } +} +``` + ## OS Support Tested only with diff --git a/src/goreportcard/README.md b/src/goreportcard/README.md index 963664d..2a2bf12 100644 --- a/src/goreportcard/README.md +++ b/src/goreportcard/README.md @@ -7,12 +7,29 @@ provides goreportcard-cli. ```json "features": { - "ghcr.io/thediveo/devcontainer-features/goreportcard:0": {} + "ghcr.io/thediveo/devcontainer-features/goreportcard:1": {} } ``` +## Feature Dependency + +This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so +that you have full control over from where and how you bring in the go +toolchain. + +For example: + +```json +{ + "features": { + "ghcr.io/devcontainers/features/go:1": {}, + "goreportcard:1": {} + } +} +``` + ## OS Support Tested only with diff --git a/src/goreportcard/devcontainer-feature.json b/src/goreportcard/devcontainer-feature.json index 0f72b83..907a324 100644 --- a/src/goreportcard/devcontainer-feature.json +++ b/src/goreportcard/devcontainer-feature.json @@ -1,12 +1,9 @@ { "name": "Go Report Card", "id": "goreportcard", - "version": "0.1.1", + "version": "1.0.0", "description": "provides goreportcard-cli.", - "dependsOn": { - "ghcr.io/devcontainers/features/go:1": { - "version": "latest", - "golangciLintVersion": "latest" - } - } + "installsAfter": [ + "ghcr.io/devcontainers/features/go" + ] } \ No newline at end of file diff --git a/test/goreportcard/test.sh b/test/goreportcard/default.sh similarity index 100% rename from test/goreportcard/test.sh rename to test/goreportcard/default.sh diff --git a/test/goreportcard/scenarios.json b/test/goreportcard/scenarios.json new file mode 100644 index 0000000..76d43ac --- /dev/null +++ b/test/goreportcard/scenarios.json @@ -0,0 +1,9 @@ +{ + "default": { + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "goreportcard": {}, + "ghcr.io/devcontainers/features/go:1": {} + } + } +} \ No newline at end of file From 4f688b2ec5cfb6efef4d3bb80ba77449ed3906c6 Mon Sep 17 00:00:00 2001 From: thediveo Date: Tue, 26 May 2026 20:41:54 +0000 Subject: [PATCH 05/13] refact: go-mod-upgrade with soft dependency on Go only Signed-off-by: thediveo --- src/go-mod-upgrade/NOTES.md | 17 +++++++++++++++ src/go-mod-upgrade/README.md | 23 +++++++++++++++++++- src/go-mod-upgrade/devcontainer-feature.json | 22 ++++++++++++++----- src/go-mod-upgrade/install.sh | 4 +++- src/gocover/NOTES.md | 2 +- src/gocover/README.md | 2 +- src/gocover/devcontainer-feature.json | 8 +++++-- src/goreportcard/NOTES.md | 2 +- src/goreportcard/README.md | 2 +- src/goreportcard/devcontainer-feature.json | 5 +++++ test/go-mod-upgrade/{test.sh => default.sh} | 0 test/go-mod-upgrade/scenarios.json | 18 +++++++++++++++ test/go-mod-upgrade/v0.13.0-beta.0.sh | 10 +++++++++ 13 files changed, 101 insertions(+), 14 deletions(-) rename test/go-mod-upgrade/{test.sh => default.sh} (100%) create mode 100644 test/go-mod-upgrade/scenarios.json create mode 100755 test/go-mod-upgrade/v0.13.0-beta.0.sh diff --git a/src/go-mod-upgrade/NOTES.md b/src/go-mod-upgrade/NOTES.md index 05904d8..fcf9133 100644 --- a/src/go-mod-upgrade/NOTES.md +++ b/src/go-mod-upgrade/NOTES.md @@ -1,3 +1,20 @@ +## Feature Dependency + +This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so +that you have full control over from where and how you bring in the go +toolchain. + +For example: + +```json +{ + "features": { + "ghcr.io/devcontainers/features/go:1": {}, + "ghcr.io/thediveo/devcontainer-features/go-mod-upgrade:1": {} + } +} +``` + ## OS Support Tested only with diff --git a/src/go-mod-upgrade/README.md b/src/go-mod-upgrade/README.md index ea76e51..af555ac 100644 --- a/src/go-mod-upgrade/README.md +++ b/src/go-mod-upgrade/README.md @@ -7,11 +7,32 @@ upgrade outdated Go dependencies interactively. ```json "features": { - "ghcr.io/thediveo/devcontainer-features/go-mod-upgrade:0": {} + "ghcr.io/thediveo/devcontainer-features/go-mod-upgrade:1": {} } ``` +## Options +| Options Id | Description | Type | Default Value | +|-----|-----|-----|-----| +| version | version of go-mod-upgrade to install | string | latest | + +## Feature Dependency + +This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so +that you have full control over from where and how you bring in the go +toolchain. + +For example: + +```json +{ + "features": { + "ghcr.io/devcontainers/features/go:1": {}, + "ghcr.io/thediveo/devcontainer-features/go-mod-upgrade:1": {} + } +} +``` ## OS Support diff --git a/src/go-mod-upgrade/devcontainer-feature.json b/src/go-mod-upgrade/devcontainer-feature.json index ffd7b66..ace52b5 100644 --- a/src/go-mod-upgrade/devcontainer-feature.json +++ b/src/go-mod-upgrade/devcontainer-feature.json @@ -1,12 +1,22 @@ { "name": "go-mod-upgrade", "id": "go-mod-upgrade", - "version": "0.1.1", + "version": "1.0.0", "description": "upgrade outdated Go dependencies interactively.", - "dependsOn": { - "ghcr.io/devcontainers/features/go:1": { - "version": "latest", - "golangciLintVersion": "latest" + "keywords": [ + "go", + "mod", + "modules", + "dependencies" + ], + "options": { + "version": { + "type": "string", + "default": "latest", + "description": "version of go-mod-upgrade to install" } - } + }, + "installsAfter": [ + "ghcr.io/devcontainers/features/go" + ] } \ No newline at end of file diff --git a/src/go-mod-upgrade/install.sh b/src/go-mod-upgrade/install.sh index ad6831a..840769e 100755 --- a/src/go-mod-upgrade/install.sh +++ b/src/go-mod-upgrade/install.sh @@ -3,9 +3,11 @@ set -e echo "Activating feature 'go-mod-upgrade'..." +VERSION="${VERSION:-"latest"}" + mkdir -p /tmp/gotools export GOCACHE=/tmp/gotools/cache -go install github.com/oligot/go-mod-upgrade@latest +go install "github.com/oligot/go-mod-upgrade@${VERSION}" rm -rf /tmp/gotools diff --git a/src/gocover/NOTES.md b/src/gocover/NOTES.md index c86849f..2a9add8 100644 --- a/src/gocover/NOTES.md +++ b/src/gocover/NOTES.md @@ -10,7 +10,7 @@ For example: { "features": { "ghcr.io/devcontainers/features/go:1": {}, - "gocover:1": {} + "ghcr.io/thediveo/devcontainer-features/gocover:1": {} } } ``` diff --git a/src/gocover/README.md b/src/gocover/README.md index 6bab234..aff55db 100644 --- a/src/gocover/README.md +++ b/src/gocover/README.md @@ -38,7 +38,7 @@ For example: { "features": { "ghcr.io/devcontainers/features/go:1": {}, - "gocover:1": {} + "ghcr.io/thediveo/devcontainer-features/gocover:1": {} } } ``` diff --git a/src/gocover/devcontainer-feature.json b/src/gocover/devcontainer-feature.json index b0aebce..e346a6c 100644 --- a/src/gocover/devcontainer-feature.json +++ b/src/gocover/devcontainer-feature.json @@ -3,7 +3,11 @@ "id": "gocover", "version": "1.0.0", "description": "a gocover command to run Go unit tests with coverages, updating the README.md with a coverage badge.", - "keywords": ["go", "coverage", "badge"], + "keywords": [ + "go", + "coverage", + "badge" + ], "options": { "root": { "type": "boolean", @@ -43,7 +47,7 @@ "uncovered-packages": { "type": "string", "default": "", - "description": "space separated optional list of package patterns to exclude from coverage analysis" + "description": "space separated optional list of package patterns to exclude from coverage analysis" }, "green": { "type": "string", diff --git a/src/goreportcard/NOTES.md b/src/goreportcard/NOTES.md index 37ca424..75ac9fd 100644 --- a/src/goreportcard/NOTES.md +++ b/src/goreportcard/NOTES.md @@ -10,7 +10,7 @@ For example: { "features": { "ghcr.io/devcontainers/features/go:1": {}, - "goreportcard:1": {} + "ghcr.io/thediveo/devcontainer-features/goreportcard:1": {} } } ``` diff --git a/src/goreportcard/README.md b/src/goreportcard/README.md index 2a2bf12..1a6e0e8 100644 --- a/src/goreportcard/README.md +++ b/src/goreportcard/README.md @@ -25,7 +25,7 @@ For example: { "features": { "ghcr.io/devcontainers/features/go:1": {}, - "goreportcard:1": {} + "ghcr.io/thediveo/devcontainer-features/goreportcard:1": {} } } ``` diff --git a/src/goreportcard/devcontainer-feature.json b/src/goreportcard/devcontainer-feature.json index 907a324..92da4ed 100644 --- a/src/goreportcard/devcontainer-feature.json +++ b/src/goreportcard/devcontainer-feature.json @@ -2,6 +2,11 @@ "name": "Go Report Card", "id": "goreportcard", "version": "1.0.0", + "keywords": [ + "go", + "goreportcard", + "score card" + ], "description": "provides goreportcard-cli.", "installsAfter": [ "ghcr.io/devcontainers/features/go" diff --git a/test/go-mod-upgrade/test.sh b/test/go-mod-upgrade/default.sh similarity index 100% rename from test/go-mod-upgrade/test.sh rename to test/go-mod-upgrade/default.sh diff --git a/test/go-mod-upgrade/scenarios.json b/test/go-mod-upgrade/scenarios.json new file mode 100644 index 0000000..ddb8565 --- /dev/null +++ b/test/go-mod-upgrade/scenarios.json @@ -0,0 +1,18 @@ +{ + "default": { + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "go-mod-upgrade": {}, + "ghcr.io/devcontainers/features/go:1": {} + } + }, + "v0.13.0-beta.0": { + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "go-mod-upgrade": { + "version": "v0.13.0-beta.0" + }, + "ghcr.io/devcontainers/features/go:1": {} + } + } +} \ No newline at end of file diff --git a/test/go-mod-upgrade/v0.13.0-beta.0.sh b/test/go-mod-upgrade/v0.13.0-beta.0.sh new file mode 100755 index 0000000..15ee6dc --- /dev/null +++ b/test/go-mod-upgrade/v0.13.0-beta.0.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +set -e + +source dev-container-features-test-lib + +go mod init example.com/foo + +check "execute go-mod-upgrade" bash -c "go-mod-upgrade --version | grep \"module version: v0.13.0-beta.0\"" + +reportResults From 955c794f56933e10fa419542c2935a697dcb439a Mon Sep 17 00:00:00 2001 From: thediveo Date: Fri, 29 May 2026 18:31:52 +0000 Subject: [PATCH 06/13] refact: autogenerated test => default Signed-off-by: thediveo --- src/bpftool/devcontainer-feature.json | 6 +++--- test/bpftool/almalinux.sh | 2 +- test/bpftool/alpine.sh | 2 +- test/bpftool/debian.sh | 2 +- test/bpftool/{test.sh => default.sh} | 0 test/bpftool/fedora.sh | 2 +- test/bpftool/scenarios.json | 8 +++++++- test/bpftool/v7.4.0.sh | 2 +- test/cni-plugins/almalinux.sh | 2 +- test/cni-plugins/debian.sh | 2 +- test/cni-plugins/{test.sh => default.sh} | 0 test/cni-plugins/fedora.sh | 2 +- test/cni-plugins/other-location.sh | 2 +- test/cni-plugins/scenarios.json | 8 +++++++- 14 files changed, 26 insertions(+), 14 deletions(-) rename test/bpftool/{test.sh => default.sh} (100%) rename test/cni-plugins/{test.sh => default.sh} (100%) diff --git a/src/bpftool/devcontainer-feature.json b/src/bpftool/devcontainer-feature.json index efac100..1d76853 100644 --- a/src/bpftool/devcontainer-feature.json +++ b/src/bpftool/devcontainer-feature.json @@ -1,13 +1,13 @@ { "name": "bpftool", "id": "bpftool", - "version": "0.0.3", - "description": "Installs bpftool from upstream https://github.com/libbpf/bpftool binary releases.", + "version": "0.0.4", + "description": "Installs bpftool binary from upstream https://github.com/libbpf/bpftool binary releases.", "options": { "version": { "type": "string", "default": "latest", - "description": "version of bpftool to install from upstream" + "description": "version of bpftool binary to install from upstream" } } } \ No newline at end of file diff --git a/test/bpftool/almalinux.sh b/test/bpftool/almalinux.sh index d4e56d7..59f7c4d 100644 --- a/test/bpftool/almalinux.sh +++ b/test/bpftool/almalinux.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -. ./test.sh +. ./default.sh diff --git a/test/bpftool/alpine.sh b/test/bpftool/alpine.sh index d4e56d7..59f7c4d 100644 --- a/test/bpftool/alpine.sh +++ b/test/bpftool/alpine.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -. ./test.sh +. ./default.sh diff --git a/test/bpftool/debian.sh b/test/bpftool/debian.sh index d4e56d7..59f7c4d 100644 --- a/test/bpftool/debian.sh +++ b/test/bpftool/debian.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -. ./test.sh +. ./default.sh diff --git a/test/bpftool/test.sh b/test/bpftool/default.sh similarity index 100% rename from test/bpftool/test.sh rename to test/bpftool/default.sh diff --git a/test/bpftool/fedora.sh b/test/bpftool/fedora.sh index d4e56d7..59f7c4d 100644 --- a/test/bpftool/fedora.sh +++ b/test/bpftool/fedora.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -. ./test.sh +. ./default.sh diff --git a/test/bpftool/scenarios.json b/test/bpftool/scenarios.json index af75017..40ac153 100644 --- a/test/bpftool/scenarios.json +++ b/test/bpftool/scenarios.json @@ -1,6 +1,12 @@ { + "default": { + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "bpftool": { } + } + }, "v7.4.0": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { "bpftool": { "version": "v7.4.0" diff --git a/test/bpftool/v7.4.0.sh b/test/bpftool/v7.4.0.sh index d4e56d7..59f7c4d 100644 --- a/test/bpftool/v7.4.0.sh +++ b/test/bpftool/v7.4.0.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -. ./test.sh +. ./default.sh diff --git a/test/cni-plugins/almalinux.sh b/test/cni-plugins/almalinux.sh index d4e56d7..59f7c4d 100644 --- a/test/cni-plugins/almalinux.sh +++ b/test/cni-plugins/almalinux.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -. ./test.sh +. ./default.sh diff --git a/test/cni-plugins/debian.sh b/test/cni-plugins/debian.sh index 67ae783..abf0a0a 100644 --- a/test/cni-plugins/debian.sh +++ b/test/cni-plugins/debian.sh @@ -3,4 +3,4 @@ set -e PORT=6666 -. ./test.sh +. ./default.sh diff --git a/test/cni-plugins/test.sh b/test/cni-plugins/default.sh similarity index 100% rename from test/cni-plugins/test.sh rename to test/cni-plugins/default.sh diff --git a/test/cni-plugins/fedora.sh b/test/cni-plugins/fedora.sh index d4e56d7..59f7c4d 100644 --- a/test/cni-plugins/fedora.sh +++ b/test/cni-plugins/fedora.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -. ./test.sh +. ./default.sh diff --git a/test/cni-plugins/other-location.sh b/test/cni-plugins/other-location.sh index 3d93415..59ee63a 100644 --- a/test/cni-plugins/other-location.sh +++ b/test/cni-plugins/other-location.sh @@ -2,4 +2,4 @@ set -e PLUGINS_PATH="/opt/cni/bin" -. ./test.sh +. ./default.sh diff --git a/test/cni-plugins/scenarios.json b/test/cni-plugins/scenarios.json index b7c1520..a239259 100644 --- a/test/cni-plugins/scenarios.json +++ b/test/cni-plugins/scenarios.json @@ -1,6 +1,12 @@ { + "default": { + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "cni-plugins": {} + } + }, "other-location": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { "cni-plugins": { "plugins-path": "/opt/cni/bin" From f2674f96eada2ff95b236364b0c96edc3a2ba8df Mon Sep 17 00:00:00 2001 From: thediveo Date: Fri, 29 May 2026 20:13:16 +0000 Subject: [PATCH 07/13] refact: bpftool, cni-plugins, docsify Signed-off-by: thediveo --- README.md | 2 +- src/docsify/devcontainer-feature.json | 4 +- test/bpftool/scenarios.json | 4 +- test/cni-plugins/scenarios.json | 4 +- test/docsify/almalinux.sh | 2 +- test/docsify/alpine.sh | 4 -- test/docsify/default.sh | 93 +++++++++++++++++++++++++++ test/docsify/scenarios.json | 12 +++- test/docsify/test.sh | 61 ------------------ 9 files changed, 110 insertions(+), 76 deletions(-) delete mode 100644 test/docsify/alpine.sh create mode 100755 test/docsify/default.sh delete mode 100755 test/docsify/test.sh diff --git a/README.md b/README.md index 2304f7f..c4fa8ca 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ doesn't support Alpine. | --------------------------- | ------ | ---- | ------ | ------ | ------ | | bpftool | ✅ | ✅ | ✅ | ✅ | ✅ | | cni-plugins | | ✅ | ✅ | ✅ | ✅ | -| docsify | | ? | ✅ | ? | ✅ | +| docsify | | ✅ | ✅ | ✅ | ✅ | | go-ebpf | | ✅ | ✅ | ✅ | ✅ | | go-mod-upgrade | | ✅ | ✅ | ✅ | ✅ | | gocover | | ✅ | ✅ | ✅ | ✅ | diff --git a/src/docsify/devcontainer-feature.json b/src/docsify/devcontainer-feature.json index cd03f69..30b916b 100644 --- a/src/docsify/devcontainer-feature.json +++ b/src/docsify/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "docsify", "id": "docsify", - "version": "0.1.3", + "version": "0.2.0", "description": "Automatically serves ./docs (or another) workspace directory via 'docsify serve' in the background.", "options": { "port": { @@ -24,7 +24,7 @@ } }, "dependsOn": { - "ghcr.io/devcontainers/features/node:1": { + "ghcr.io/devcontainers/features/node:2": { "version": "lts" } }, diff --git a/test/bpftool/scenarios.json b/test/bpftool/scenarios.json index 40ac153..4dd5870 100644 --- a/test/bpftool/scenarios.json +++ b/test/bpftool/scenarios.json @@ -14,7 +14,7 @@ } }, "almalinux": { - "image": "ghcr.io/almalinux/almalinux:9", + "image": "ghcr.io/almalinux/almalinux:10", "features": { "bpftool": {} } @@ -26,7 +26,7 @@ } }, "debian": { - "image": "mcr.microsoft.com/devcontainers/base:debian-12", + "image": "mcr.microsoft.com/devcontainers/base:debian-13", "features": { "bpftool": {} } diff --git a/test/cni-plugins/scenarios.json b/test/cni-plugins/scenarios.json index a239259..81150d6 100644 --- a/test/cni-plugins/scenarios.json +++ b/test/cni-plugins/scenarios.json @@ -14,13 +14,13 @@ } }, "almalinux": { - "image": "ghcr.io/almalinux/almalinux:9", + "image": "ghcr.io/almalinux/almalinux:10", "features": { "cni-plugins": {} } }, "debian": { - "image": "mcr.microsoft.com/devcontainers/base:debian-12", + "image": "mcr.microsoft.com/devcontainers/base:debian-13", "features": { "cni-plugins": {} } diff --git a/test/docsify/almalinux.sh b/test/docsify/almalinux.sh index d4e56d7..59f7c4d 100644 --- a/test/docsify/almalinux.sh +++ b/test/docsify/almalinux.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -. ./test.sh +. ./default.sh diff --git a/test/docsify/alpine.sh b/test/docsify/alpine.sh deleted file mode 100644 index d4e56d7..0000000 --- a/test/docsify/alpine.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -set -e - -. ./test.sh diff --git a/test/docsify/default.sh b/test/docsify/default.sh new file mode 100755 index 0000000..4ede9a5 --- /dev/null +++ b/test/docsify/default.sh @@ -0,0 +1,93 @@ +#!/usr/bin/env bash + +# This is a slightly overachieving test that ensures that when there's no +# index.html present in the directory docsify is supposed to serve from a proper +# fallback fake site is generated during start up and correctly served. + +set -e + +source dev-container-features-test-lib + +CMD=$(cat </dev/null 2>&1; then + SUDO="sudo" +else + SUDO="" +fi + +install_browser_deps() { + if command -v apt-get >/dev/null 2>&1; then + echo "detected Debian/Ubuntu" + + sudo apt-get update + wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/googlechrome-linux-keyring.gpg + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/googlechrome-linux-keyring.gpg] https://dl-ssl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google.list + sudo apt-get update + DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC sudo apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-freefont-ttf libxss1 dbus dbus-x11 --no-install-recommends + CHROMIUMPATH=/usr/bin/google-chrome-stable + + elif command -v dnf >/dev/null 2>&1; then + echo "detected RHEL/Alma/Rocky/Fedora" + + $SUDO dnf install -y epel-release || true + $SUDO dnf install -y chromium + CHROMIUMPATH="$(command -v chromium-browser)" + + else + echo "Unsupported distro" + exit 1 + fi +} + +install_browser_deps + +echo "installing puppeteer..." +PUPPETEER_SKIP_DOWNLOAD=true npm install puppeteer --save + +SCRIPT=$(cat < Date: Sat, 30 May 2026 13:31:49 +0000 Subject: [PATCH 08/13] refact: go-ebpf Signed-off-by: thediveo --- src/go-ebpf/NOTES.md | 17 +++++++++++++++++ src/go-ebpf/devcontainer-feature.json | 11 ++++------- test/go-ebpf/almalinux.sh | 2 +- test/go-ebpf/debian.sh | 2 +- test/go-ebpf/{test.sh => default.sh} | 0 test/go-ebpf/fedora.sh | 2 +- test/go-ebpf/scenarios.json | 16 +++++++++++++--- 7 files changed, 37 insertions(+), 13 deletions(-) rename test/go-ebpf/{test.sh => default.sh} (100%) diff --git a/src/go-ebpf/NOTES.md b/src/go-ebpf/NOTES.md index bf7bde5..61806b0 100644 --- a/src/go-ebpf/NOTES.md +++ b/src/go-ebpf/NOTES.md @@ -1,3 +1,20 @@ +## Feature Dependency + +This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so +that you have full control over from where and how you bring in the go +toolchain. + +For example: + +```json +{ + "features": { + "ghcr.io/devcontainers/features/go:1": {}, + "ghcr.io/thediveo/devcontainer-features/gocover:1": {} + } +} +``` + ## PID Namespace Depending on what your eBPF is doing inside the devcontainer (or inside a diff --git a/src/go-ebpf/devcontainer-feature.json b/src/go-ebpf/devcontainer-feature.json index d023223..2240dc6 100644 --- a/src/go-ebpf/devcontainer-feature.json +++ b/src/go-ebpf/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "Go ebpf development", "id": "go-ebpf", - "version": "0.0.1", + "version": "1.0.0", "description": "Installs clang and llvm, and on top Cilium's bpf2go.", "options": { "bfp2go-version": { @@ -10,12 +10,9 @@ "description": "version of bpf2go to install" } }, - "dependsOn": { - "ghcr.io/devcontainers/features/go:1": { - "version": "latest", - "golangciLintVersion": "latest" - } - }, + "installsAfter": [ + "ghcr.io/devcontainers/features/go" + ], "customizations": { "vscode": { "extensions": [ diff --git a/test/go-ebpf/almalinux.sh b/test/go-ebpf/almalinux.sh index d4e56d7..59f7c4d 100644 --- a/test/go-ebpf/almalinux.sh +++ b/test/go-ebpf/almalinux.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -. ./test.sh +. ./default.sh diff --git a/test/go-ebpf/debian.sh b/test/go-ebpf/debian.sh index d4e56d7..59f7c4d 100644 --- a/test/go-ebpf/debian.sh +++ b/test/go-ebpf/debian.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -. ./test.sh +. ./default.sh diff --git a/test/go-ebpf/test.sh b/test/go-ebpf/default.sh similarity index 100% rename from test/go-ebpf/test.sh rename to test/go-ebpf/default.sh diff --git a/test/go-ebpf/fedora.sh b/test/go-ebpf/fedora.sh index d4e56d7..59f7c4d 100644 --- a/test/go-ebpf/fedora.sh +++ b/test/go-ebpf/fedora.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -. ./test.sh +. ./default.sh diff --git a/test/go-ebpf/scenarios.json b/test/go-ebpf/scenarios.json index ee2f020..6ea5ffd 100644 --- a/test/go-ebpf/scenarios.json +++ b/test/go-ebpf/scenarios.json @@ -1,19 +1,29 @@ { - "almalinux": { - "image": "ghcr.io/almalinux/almalinux:9", + "default": { + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { + "ghcr.io/devcontainers/features/go:1": {}, "go-ebpf": {} } }, + "almalinux": { + "image": "ghcr.io/almalinux/almalinux:10", + "features": { + "go-ebpf": {}, + "ghcr.io/devcontainers/features/go:1": {} + } + }, "debian": { - "image": "mcr.microsoft.com/devcontainers/base:debian-12", + "image": "mcr.microsoft.com/devcontainers/base:debian-13", "features": { + "ghcr.io/devcontainers/features/go:1": {}, "go-ebpf": {} } }, "fedora": { "image": "fedora", "features": { + "ghcr.io/devcontainers/features/go:1": {}, "go-ebpf": {} } } From 9ae5ce33263d19b1fd6cdc2ff9ccc75ef4466b33 Mon Sep 17 00:00:00 2001 From: thediveo Date: Sat, 30 May 2026 13:37:52 +0000 Subject: [PATCH 09/13] refact: go-mod-upgrade Signed-off-by: thediveo --- src/go-ebpf/NOTES.md | 2 +- src/go-mod-upgrade/NOTES.md | 6 ++++++ test/go-mod-upgrade/{v0.13.0-beta.0.sh => beta.sh} | 2 +- test/go-mod-upgrade/scenarios.json | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) rename test/go-mod-upgrade/{v0.13.0-beta.0.sh => beta.sh} (80%) diff --git a/src/go-ebpf/NOTES.md b/src/go-ebpf/NOTES.md index 61806b0..11f2b6c 100644 --- a/src/go-ebpf/NOTES.md +++ b/src/go-ebpf/NOTES.md @@ -10,7 +10,7 @@ For example: { "features": { "ghcr.io/devcontainers/features/go:1": {}, - "ghcr.io/thediveo/devcontainer-features/gocover:1": {} + "ghcr.io/thediveo/devcontainer-features/go-ebpf:1": {} } } ``` diff --git a/src/go-mod-upgrade/NOTES.md b/src/go-mod-upgrade/NOTES.md index fcf9133..5548096 100644 --- a/src/go-mod-upgrade/NOTES.md +++ b/src/go-mod-upgrade/NOTES.md @@ -15,6 +15,12 @@ For example: } ``` +## `go-mod-upgrade` Command + +Please refer to the [upstream repository +`@oligot/go-mod-upgrade`](https://github.com/oligot/go-mod-upgrade) for +documentation. + ## OS Support Tested only with diff --git a/test/go-mod-upgrade/v0.13.0-beta.0.sh b/test/go-mod-upgrade/beta.sh similarity index 80% rename from test/go-mod-upgrade/v0.13.0-beta.0.sh rename to test/go-mod-upgrade/beta.sh index 15ee6dc..a1971b7 100755 --- a/test/go-mod-upgrade/v0.13.0-beta.0.sh +++ b/test/go-mod-upgrade/beta.sh @@ -5,6 +5,6 @@ source dev-container-features-test-lib go mod init example.com/foo -check "execute go-mod-upgrade" bash -c "go-mod-upgrade --version | grep \"module version: v0.13.0-beta.0\"" +check "execute go-mod-upgrade" bash -c "go-mod-upgrade --version | grep \"module version: v0.13.0-beta.\"" reportResults diff --git a/test/go-mod-upgrade/scenarios.json b/test/go-mod-upgrade/scenarios.json index ddb8565..db03183 100644 --- a/test/go-mod-upgrade/scenarios.json +++ b/test/go-mod-upgrade/scenarios.json @@ -6,11 +6,11 @@ "ghcr.io/devcontainers/features/go:1": {} } }, - "v0.13.0-beta.0": { + "beta": { "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { "go-mod-upgrade": { - "version": "v0.13.0-beta.0" + "version": "v0.13.0-beta.1" }, "ghcr.io/devcontainers/features/go:1": {} } From 105b5aef01e484edd76a5653bac5984bcef8e893 Mon Sep 17 00:00:00 2001 From: thediveo Date: Sat, 30 May 2026 13:52:40 +0000 Subject: [PATCH 10/13] refact: local-pkgsite Signed-off-by: thediveo --- src/local-pkgsite/NOTES.md | 21 ++++++++++++++++++ src/local-pkgsite/devcontainer-feature.json | 15 +++++-------- test/local-pkgsite/almalinux.sh | 2 +- test/local-pkgsite/debian.sh | 4 +++- test/local-pkgsite/{test.sh => default.sh} | 0 test/local-pkgsite/fedora.sh | 2 +- test/local-pkgsite/port-12345.sh | 2 +- test/local-pkgsite/scenarios.json | 24 +++++++++++++++++---- 8 files changed, 52 insertions(+), 18 deletions(-) rename test/local-pkgsite/{test.sh => default.sh} (100%) diff --git a/src/local-pkgsite/NOTES.md b/src/local-pkgsite/NOTES.md index 728da48..fc4f590 100644 --- a/src/local-pkgsite/NOTES.md +++ b/src/local-pkgsite/NOTES.md @@ -1,3 +1,24 @@ +## Feature Dependency + +This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so +that you have full control over from where and how you bring in the go +toolchain. + +Similar, it has a soft dependency on `ghcr.io/devcontainers/features/node` – +depending on you base image you already have a suitable node, otherwise you +might want to use the aforementioned node feature. + +For example: + +```json +{ + "features": { + "ghcr.io/devcontainers/features/go:1": {}, + "ghcr.io/devcontainers/features/node:2": {}, // optional + "ghcr.io/thediveo/devcontainer-features/local-pkgsite:1": {} + } +} +``` ## OS Support Tested with: diff --git a/src/local-pkgsite/devcontainer-feature.json b/src/local-pkgsite/devcontainer-feature.json index 97607eb..e039ef2 100644 --- a/src/local-pkgsite/devcontainer-feature.json +++ b/src/local-pkgsite/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "Local Go Pkgsite", "id": "local-pkgsite", - "version": "0.1.5", + "version": "1.0.0", "description": "A local Go pkgsite serving the module documentation, with automatic browser refresh.", "options": { "port": { @@ -23,14 +23,9 @@ "default": "5000" } }, - "dependsOn": { - "ghcr.io/devcontainers/features/go:1": { - "version": "latest", - "golangciLintVersion": "latest" - }, - "ghcr.io/devcontainers/features/node:1": { - "version": "lts" - } - }, + "installsAfter": [ + "ghcr.io/devcontainers/features/node", + "ghcr.io/devcontainers/features/go" + ], "postStartCommand": "/usr/local/bin/pkgsite-serve" } \ No newline at end of file diff --git a/test/local-pkgsite/almalinux.sh b/test/local-pkgsite/almalinux.sh index d4e56d7..59f7c4d 100644 --- a/test/local-pkgsite/almalinux.sh +++ b/test/local-pkgsite/almalinux.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -. ./test.sh +. ./default.sh diff --git a/test/local-pkgsite/debian.sh b/test/local-pkgsite/debian.sh index d4e56d7..abf0a0a 100644 --- a/test/local-pkgsite/debian.sh +++ b/test/local-pkgsite/debian.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash set -e -. ./test.sh +PORT=6666 + +. ./default.sh diff --git a/test/local-pkgsite/test.sh b/test/local-pkgsite/default.sh similarity index 100% rename from test/local-pkgsite/test.sh rename to test/local-pkgsite/default.sh diff --git a/test/local-pkgsite/fedora.sh b/test/local-pkgsite/fedora.sh index d4e56d7..59f7c4d 100644 --- a/test/local-pkgsite/fedora.sh +++ b/test/local-pkgsite/fedora.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -e -. ./test.sh +. ./default.sh diff --git a/test/local-pkgsite/port-12345.sh b/test/local-pkgsite/port-12345.sh index 0544261..2346c90 100644 --- a/test/local-pkgsite/port-12345.sh +++ b/test/local-pkgsite/port-12345.sh @@ -3,4 +3,4 @@ set -e PORT=12345 -. ./test.sh +. ./default.sh diff --git a/test/local-pkgsite/scenarios.json b/test/local-pkgsite/scenarios.json index 21deb4c..1079825 100644 --- a/test/local-pkgsite/scenarios.json +++ b/test/local-pkgsite/scenarios.json @@ -1,22 +1,36 @@ { + "default": { + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "ghcr.io/devcontainers/features/node:2": {}, + "ghcr.io/devcontainers/features/go:1": {}, + "local-pkgsite": {} + } + }, "port-12345": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { + "ghcr.io/devcontainers/features/node:2": {}, + "ghcr.io/devcontainers/features/go:1": {}, "local-pkgsite": { "port": 12345 } } }, "almalinux": { - "image": "ghcr.io/almalinux/almalinux:9", + "image": "ghcr.io/almalinux/almalinux:10", "features": { + "ghcr.io/devcontainers/features/node:2": {}, + "ghcr.io/devcontainers/features/go:1": {}, "local-pkgsite": {} }, "postCreateCommand": "yum install -y procps" }, "debian": { - "image": "mcr.microsoft.com/devcontainers/base:debian-12", + "image": "mcr.microsoft.com/devcontainers/base:debian-13", "features": { + "ghcr.io/devcontainers/features/node:2": {}, + "ghcr.io/devcontainers/features/go:1": {}, "local-pkgsite": { "port": 6666 } @@ -25,8 +39,10 @@ "fedora": { "image": "fedora", "features": { + "ghcr.io/devcontainers/features/node:2": {}, + "ghcr.io/devcontainers/features/go:1": {}, "local-pkgsite": {} }, "postCreateCommand": "yum install -y procps" } -} \ No newline at end of file +} \ No newline at end of file From 4ee33b1b41c46f7a9442e27929717199c8f4581d Mon Sep 17 00:00:00 2001 From: thediveo Date: Sat, 30 May 2026 17:28:38 +0000 Subject: [PATCH 11/13] refact: nerdctl tests Signed-off-by: thediveo --- src/nerdctl/README.md | 2 +- test/nerdctl/{test.sh => default.sh} | 0 test/nerdctl/scenarios.json | 8 +++++++- 3 files changed, 8 insertions(+), 2 deletions(-) rename test/nerdctl/{test.sh => default.sh} (100%) diff --git a/src/nerdctl/README.md b/src/nerdctl/README.md index ce12550..cc5e347 100644 --- a/src/nerdctl/README.md +++ b/src/nerdctl/README.md @@ -32,7 +32,7 @@ feature, you need to explicitly configure the non-standard API endpoint URL for ```json "features": { - "ghcr.io/devcontainers/features/docker-in-docker:2": { + "ghcr.io/devcontainers/features/docker-in-docker:3": { "dockerDashComposeVersion": "none", "installDockerBuildx": false }, diff --git a/test/nerdctl/test.sh b/test/nerdctl/default.sh similarity index 100% rename from test/nerdctl/test.sh rename to test/nerdctl/default.sh diff --git a/test/nerdctl/scenarios.json b/test/nerdctl/scenarios.json index 70d9d6b..8e2fd69 100644 --- a/test/nerdctl/scenarios.json +++ b/test/nerdctl/scenarios.json @@ -1,4 +1,10 @@ { + "default": { + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "nerdctl": {} + } + }, "almalinux": { "image": "ghcr.io/almalinux/almalinux:9", "features": { @@ -10,7 +16,7 @@ "debian": { "image": "mcr.microsoft.com/devcontainers/base:debian-13", "features": { - "ghcr.io/devcontainers/features/docker-in-docker:2": { + "ghcr.io/devcontainers/features/docker-in-docker:3": { "moby": false, "dockerDashComposeVersion": "none", "installDockerBuildx": false From d29bd294c2e04be53d0e29427644d3e7e2620b90 Mon Sep 17 00:00:00 2001 From: thediveo Date: Sat, 30 May 2026 17:44:11 +0000 Subject: [PATCH 12/13] refact: pull-through-cache-registry Signed-off-by: thediveo --- src/pull-through-cache-registry/NOTES.md | 21 ++++++++++++++---- .../devcontainer-feature.json | 22 +++++++++++-------- .../{test.sh => default.sh} | 0 .../scenarios.json | 15 +++++++++++++ 4 files changed, 45 insertions(+), 13 deletions(-) rename test/pull-through-cache-registry/{test.sh => default.sh} (100%) diff --git a/src/pull-through-cache-registry/NOTES.md b/src/pull-through-cache-registry/NOTES.md index 4fa1116..0795336 100644 --- a/src/pull-through-cache-registry/NOTES.md +++ b/src/pull-through-cache-registry/NOTES.md @@ -10,11 +10,24 @@ In the best tradition of [dogfooding](https://en.wikipedia.org/wiki/Eating_your_own_dog_food) we use this feature to develop our features. -## Important -- this feature depends on `ghcr.io/devcontainers/features/docker-in-docker:3`. -- at this time, it needs to set the docker-in-docker configuration parameter - `moby` to `false` in order to work on Debian 13 as well as Ubuntu 26.04. +## Feature Dependency + +This feature has only a soft dependecy on +`ghcr.io/devcontainers/features/docker-in-docker` so that you have full control +over from where and how you bring in Docker-in-Docker. + +For example: + +```json +{ + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:3": { + "moby": false + }, + } +} +``` ## OS Support diff --git a/src/pull-through-cache-registry/devcontainer-feature.json b/src/pull-through-cache-registry/devcontainer-feature.json index 7056bc3..c9853d5 100644 --- a/src/pull-through-cache-registry/devcontainer-feature.json +++ b/src/pull-through-cache-registry/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "OCI registry pull-through cache to mirror rate-limited upstream registries, such as Docker Hub", "id": "pull-through-cache-registry", - "version": "0.2.1", + "version": "1.0.0", "description": "Deploys a devcontainer-local CNCF Distribution Registry configured as a pull-through cache for the local docker-in-docker", "documentationURL": "https://github.com/thediveo/devcontainer-features/blob/master/src/registry-pull-through-cache/README.md", "options": { @@ -14,13 +14,19 @@ "type": "string", "default": "5000", "description": "port to bind the CNCF Distribution Registry service to.", - "proposals": ["5000", "9999"] + "proposals": [ + "5000", + "9999" + ] }, "ttl": { "type": "string", "default": "168h", "description": "expire proxy cache storage after this duration, 168h corresponds with 7 days by default, set to 0 to disable any expiration. Valid duration suffixes are s, m, h, without suffix nanoseconds are assumed.", - "proposals": ["24h", "168h"] + "proposals": [ + "24h", + "168h" + ] }, "registry-name": { "type": "string", @@ -41,9 +47,7 @@ } ], "postCreateCommand": "/usr/local/bin/registry-pull-through-cache", - "dependsOn": { - "ghcr.io/devcontainers/features/docker-in-docker:3": { - "moby": false - } - } -} + "installsAfter": [ + "ghcr.io/devcontainers/features/docker-in-docker" + ] +} \ No newline at end of file diff --git a/test/pull-through-cache-registry/test.sh b/test/pull-through-cache-registry/default.sh similarity index 100% rename from test/pull-through-cache-registry/test.sh rename to test/pull-through-cache-registry/default.sh diff --git a/test/pull-through-cache-registry/scenarios.json b/test/pull-through-cache-registry/scenarios.json index 26196b7..9313dd4 100644 --- a/test/pull-through-cache-registry/scenarios.json +++ b/test/pull-through-cache-registry/scenarios.json @@ -1,7 +1,19 @@ { + "default": { + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:3": { + "moby": false + }, + "pull-through-cache-registry": {} + } + }, "9999": { "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { + "ghcr.io/devcontainers/features/docker-in-docker:3": { + "moby": false + }, "pull-through-cache-registry": { "port": "9999" } @@ -10,6 +22,9 @@ "quay.io": { "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { + "ghcr.io/devcontainers/features/docker-in-docker:3": { + "moby": false + }, "pull-through-cache-registry": { "proxy-remote-url": "https://quay.io" } From 0b19f1701fc0c659730903c037558efef1cd2843 Mon Sep 17 00:00:00 2001 From: thediveo Date: Sat, 30 May 2026 20:05:41 +0000 Subject: [PATCH 13/13] refact: drop autogenerated tests, use explicit default tests instead Signed-off-by: thediveo --- .github/workflows/test.yaml | 10 +++++----- src/bpftool/README.md | 4 ++-- src/go-ebpf/README.md | 19 ++++++++++++++++++- src/go-mod-upgrade/README.md | 6 ++++++ src/local-pkgsite/README.md | 23 ++++++++++++++++++++++- src/nerdctl/README.md | 2 +- src/pull-through-cache-registry/README.md | 23 ++++++++++++++++++----- 7 files changed, 72 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b92d671..e8d26db 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -17,19 +17,19 @@ jobs: - bpftool - cni-plugins - docsify - - grafanactl - - gocover - go-ebpf - go-mod-upgrade + - gocover - goreportcard + - grafanactl - lazygit - local-pkgsite - nerdctl - pin-github-action - pull-through-cache-registry - - wal-wahl + # - wal-wahl baseImage: - - mcr.microsoft.com/devcontainers/base:ubuntu-24.04 + - mcr.microsoft.com/devcontainers/base:ubuntu steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6 @@ -37,4 +37,4 @@ jobs: run: npm install -g @devcontainers/cli@0.84.1 - name: "generating tests for '${{ matrix.features }}' against '${{ matrix.baseImage }}'" - run: devcontainer features test --skip-duplicated -f ${{ matrix.features }} -i ${{ matrix.baseImage }} . + run: devcontainer features test --skip-autogenerated --skip-duplicated -f ${{ matrix.features }} -i ${{ matrix.baseImage }} . diff --git a/src/bpftool/README.md b/src/bpftool/README.md index 1ce0d90..ace2a99 100644 --- a/src/bpftool/README.md +++ b/src/bpftool/README.md @@ -1,7 +1,7 @@ # bpftool (bpftool) -Installs bpftool from upstream https://github.com/libbpf/bpftool binary releases. +Installs bpftool binary from upstream https://github.com/libbpf/bpftool binary releases. ## Example Usage @@ -15,7 +15,7 @@ Installs bpftool from upstream https://github.com/libbpf/bpftool binary releases | Options Id | Description | Type | Default Value | |-----|-----|-----|-----| -| version | version of bpftool to install from upstream | string | latest | +| version | version of bpftool binary to install from upstream | string | latest | ## OS Support diff --git a/src/go-ebpf/README.md b/src/go-ebpf/README.md index b1d082a..29fb47a 100644 --- a/src/go-ebpf/README.md +++ b/src/go-ebpf/README.md @@ -7,7 +7,7 @@ Installs clang and llvm, and on top Cilium's bpf2go. ```json "features": { - "ghcr.io/thediveo/devcontainer-features/go-ebpf:0": {} + "ghcr.io/thediveo/devcontainer-features/go-ebpf:1": {} } ``` @@ -23,6 +23,23 @@ Installs clang and llvm, and on top Cilium's bpf2go. - `ms-vscode.cpptools-extension-pack` +## Feature Dependency + +This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so +that you have full control over from where and how you bring in the go +toolchain. + +For example: + +```json +{ + "features": { + "ghcr.io/devcontainers/features/go:1": {}, + "ghcr.io/thediveo/devcontainer-features/go-ebpf:1": {} + } +} +``` + ## PID Namespace Depending on what your eBPF is doing inside the devcontainer (or inside a diff --git a/src/go-mod-upgrade/README.md b/src/go-mod-upgrade/README.md index af555ac..547030b 100644 --- a/src/go-mod-upgrade/README.md +++ b/src/go-mod-upgrade/README.md @@ -34,6 +34,12 @@ For example: } ``` +## `go-mod-upgrade` Command + +Please refer to the [upstream repository +`@oligot/go-mod-upgrade`](https://github.com/oligot/go-mod-upgrade) for +documentation. + ## OS Support Tested only with diff --git a/src/local-pkgsite/README.md b/src/local-pkgsite/README.md index ffaf7e2..3aa5213 100644 --- a/src/local-pkgsite/README.md +++ b/src/local-pkgsite/README.md @@ -7,7 +7,7 @@ A local Go pkgsite serving the module documentation, with automatic browser refr ```json "features": { - "ghcr.io/thediveo/devcontainer-features/local-pkgsite:0": {} + "ghcr.io/thediveo/devcontainer-features/local-pkgsite:1": {} } ``` @@ -19,6 +19,27 @@ A local Go pkgsite serving the module documentation, with automatic browser refr | reload-delay | time in milliseconds to delay the reload event following file changes | string | 2000 | | reload-debounce | time in milliseconds to restrict the frequency in which browser:reload events can be emitted to connected clients | string | 5000 | +## Feature Dependency + +This feature has only a soft dependecy on `ghcr.io/devcontainers/features/go` so +that you have full control over from where and how you bring in the go +toolchain. + +Similar, it has a soft dependency on `ghcr.io/devcontainers/features/node` – +depending on you base image you already have a suitable node, otherwise you +might want to use the aforementioned node feature. + +For example: + +```json +{ + "features": { + "ghcr.io/devcontainers/features/go:1": {}, + "ghcr.io/devcontainers/features/node:2": {}, // optional + "ghcr.io/thediveo/devcontainer-features/local-pkgsite:1": {} + } +} +``` ## OS Support Tested with: diff --git a/src/nerdctl/README.md b/src/nerdctl/README.md index cc5e347..ce12550 100644 --- a/src/nerdctl/README.md +++ b/src/nerdctl/README.md @@ -32,7 +32,7 @@ feature, you need to explicitly configure the non-standard API endpoint URL for ```json "features": { - "ghcr.io/devcontainers/features/docker-in-docker:3": { + "ghcr.io/devcontainers/features/docker-in-docker:2": { "dockerDashComposeVersion": "none", "installDockerBuildx": false }, diff --git a/src/pull-through-cache-registry/README.md b/src/pull-through-cache-registry/README.md index e001650..b9d849c 100644 --- a/src/pull-through-cache-registry/README.md +++ b/src/pull-through-cache-registry/README.md @@ -7,7 +7,7 @@ Deploys a devcontainer-local CNCF Distribution Registry configured as a pull-thr ```json "features": { - "ghcr.io/thediveo/devcontainer-features/pull-through-cache-registry:0": {} + "ghcr.io/thediveo/devcontainer-features/pull-through-cache-registry:1": {} } ``` @@ -33,11 +33,24 @@ In the best tradition of [dogfooding](https://en.wikipedia.org/wiki/Eating_your_own_dog_food) we use this feature to develop our features. -## Important -- this feature depends on `ghcr.io/devcontainers/features/docker-in-docker:3`. -- at this time, it needs to set the docker-in-docker configuration parameter - `moby` to `false` in order to work on Debian 13 as well as Ubuntu 26.04. +## Feature Dependency + +This feature has only a soft dependecy on +`ghcr.io/devcontainers/features/docker-in-docker` so that you have full control +over from where and how you bring in Docker-in-Docker. + +For example: + +```json +{ + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:3": { + "moby": false + }, + } +} +``` ## OS Support