Skip to content

chore: reset the repository to the Dev Container Features format #3

Closed

Description

@dan-petty

Goal

The owner (2026-11-19): this repository becomes a collection of Dev Container Features that make debian:sid usable: podman-in-podman, podman-outside-podman, and any other Feature that sid needs. The upstream Features of the fork are not needed. Keep the format of devcontainers/features. This first change resets the repository to that format, with no Feature yet; each Feature comes in its own issue and pull request.

Changes

PR 1 makes one commit on main that keeps the git history and resets the repository to the devcontainers/features format (format F1-F8 verdicts). Reference: upstream/main 44ebeea. feature-starter has been stale since 2024-08.

KEEP: .github/labels.yml and .github/roadmap.toml (board = 5; the roadmap Service of dan-petty reads both). Keep .gitignore and add node_modules/. Keep LICENSE as MIT with its 'Copyright (c) 2022 Microsoft Corporation.' line, because the entrypoints adapt docker-init.sh nesting (docker-in-docker install.sh:1048-1077) and the docker-outside-of-docker socat fallback (:508-521). Add the owner's copyright line. Keep the src// and test// layout, with test/_global for combined scenarios.

REMOVE: every upstream Feature under src/ and every upstream test under test/, test/_global included. Remove .vscode/launch.json (it points at /home/codespace paths), .github/dependabot.yaml, and these 7 workflows: docker-in-docker-daemon-startup-bulk-test.yaml; linter-automated.yaml (azohra/shell-linter now redirects to Azbagheri/shell-linter, last pushed 2025-02-23); linter-manual.yaml; test-pr-arm64.yaml (unless arm64 becomes a target); update-aws-cli-completer-scripts.yml, update-documentation.yml and update-dotnet-install-script.yml (they need the upstream GitHub App variables and secrets and open bot PRs). The fork's main has no scripts/ folder and no version-resolution.yaml, because both reached upstream after merge-base 4740648. The fork has 12 workflows, not 13 (git ls-tree origin/main).

CHANGE: CODEOWNERS becomes '* @dan-petty' (now '* @devcontainers/maintainers'). Rewrite README.md for this collection. It states the purpose (make debian:sid usable: the two Podman Features, plus the list of upstream Features that already work on sid), usage as ghcr.io/dan-petty/devcontainer-features/:1, the layout and links to the spec. Each Feature PR adds its own row. Replace CONTRIBUTING.md (now Microsoft CLA, MSRC and Slack) with a short local version: one issue per PR, a semver bump in devcontainer-feature.json for each change to src//, the regenerated README committed in the same PR, and the test commands. Rebuild .devcontainer/devcontainer.json. A Feature in ./src cannot be a local Feature (the spec requires local Features under .devcontainer/). Until the devtools image exists, use ghcr.io/dan-petty/devops-cli/devcontainer by digest. It is public and already has the devcontainer CLI, node, shellcheck and a Docker engine. After that, use the devtools image plus podman-in-podman:1. Renovate bumps the digest.

ADD: package.json and package-lock.json at the root, with @devcontainers/cli as a devDependency and npm scripts for test and docs. Renovate's npm manager bumps it. Add .github/renovate.json, which extends github>dan-petty/devops-cli//.github/renovate/base. That preset already groups the devcontainer manager and pins digests for github-actions and devcontainer (.github/renovate/base.json:86-88, :125-139).

WORKFLOWS (all on ubuntu-latest, all start with npm ci, all call the CLI as npx devcontainer):

  • validate-metadata-files.yml (kept): devcontainers/action@v1 validate-only. It checks the schema with ajv and needs no CLI (action main.ts:68-76, utils.ts:120-139). It runs only when src/*/devcontainer-feature.json exists (hashFiles), because PR 1 leaves src empty.
  • test-pr.yaml (kept, rewritten): dorny/paths-filter@v4 with one filter per new Feature id (upstream hard-codes 28 at :15-42). test-scenarios moves off the non-stock 'devcontainer-image-builder-ubuntu' label (:83) to ubuntu-latest. Base image debian:sid. Add one podman-host job: a docker shim to the runner's Podman runs the keep-id scenarios.
  • test-all.yaml (kept): runs on push to main, on workflow_dispatch and on a weekly schedule, because sid packages float and the Features have no pins. It covers every Feature on debian:sid plus test-global.
  • test-manual.yaml (kept): workflow_dispatch with id and base-image inputs.
  • release.yaml (kept): runs on push to main for paths src/**, with packages: write and contents: write. Steps: npm ci, then echo "$PWD/node_modules/.bin" >> "$GITHUB_PATH", then devcontainers/action@v1 publish-features with base-path-to-features ./src. The action uses a devcontainer it finds on PATH and runs its unpinned npm install -g @devcontainers/cli only when none exists (action utils.ts:38-50, :88-109). So the lockfile version publishes, with no custom Renovate manager for the action input devcontainer-cli-version.
  • lint.yaml (new; replaces linter-automated.yaml): git ls-files -z '*.sh' | xargs -0r shellcheck (shellcheck is on the runner and is an apt package in sid). A docs drift check: npx devcontainer features generate-docs -p src -n dan-petty/devcontainer-features --github-owner dan-petty --github-repo devcontainer-features and then git diff --exit-code -- 'src/*/README.md' (-p must be src, format F4 verdict). This replaces bot PRs. A version-bump check: when a PR changes src// (README.md excepted), the version in devcontainer-feature.json must differ from origin/main. Without that check, publish skips silently, because tooling never republishes an exact version (format F5). The check is about 10 lines of git and jq. No open action for it was found.

RELEASE NAMESPACE: ghcr.io/dan-petty/devcontainer-features/ with tags 1, 1.0, 1.0.0 and latest. The collection goes to ghcr.io/dan-petty/devcontainer-features:latest (devcontainer-collection.json), and the action adds repo tags feature__. Each Feature starts at 1.0.0.

STEPS FOR A PERSON (not PRs): enable Actions and set the workflow permissions (0 runs so far; the settings could not be read without auth). Make each GHCR package and the collection public after the first publish. This cannot be undone, and new packages are private. Close fork issue #2 as not planned, because the reset drops docker-in-docker and the forky patch. Delete the 266 inherited feature_* tags, the v0.0.x tags and the 317 upstream branches, so a later tag cannot collide with an old one. Leave the fork network (Settings > Danger Zone; permanent). Keep 'upstream' only as a local read-only remote. Never use Sync fork.

Done when

git ls-files lists only the kept and new files. npm ci && npx devcontainer --version prints the lockfile version on ubuntu-latest and in the repository's devcontainer. actionlint passes on .github/workflows in the devcontainer. The lint workflow passes on the PR, with shellcheck on zero scripts through xargs -r. npx renovate-config-validator .github/renovate.json, or the Renovate onboarding check, accepts the config.

After the merge, issue #2 (send the forky patch upstream) is moot: the docker-in-docker Feature leaves the repository.

Proposed design

Problem statement

Reset the fork to the devcontainers/features layout in one commit, with no Feature yet. The fork keeps upstream Features that debian:sid does not need, and the reset keeps the history and the road map files. The code work has no block. Three gates stay: the owner must enable Actions and set the workflow permissions (0 runs so far), make each GHCR package public after the first publish, and delete the inherited tags and branches before the first release tag.

Acceptance criteria

Requirement: Upstream content removed

The reset MUST remove every upstream Feature under src/ and every upstream test under test/, test/_global included.

Scenario: Empty src and test

  • WHEN git ls-files 'src/*' 'test/*' runs on the reset commit
  • THEN the command prints nothing

Requirement: Kept workflow set

The reset MUST remove the 7 named workflows and leave exactly lint.yaml, release.yaml, test-all.yaml, test-manual.yaml, test-pr.yaml and validate-metadata-files.yml.

Scenario: Only the kept workflows remain

  • WHEN git ls-files .github/workflows .vscode .github/dependabot.yaml runs on the reset commit
  • THEN the output lists only lint.yaml, release.yaml, test-all.yaml, test-manual.yaml, test-pr.yaml and validate-metadata-files.yml

Requirement: Road map files kept

The reset MUST keep .github/labels.yml and .github/roadmap.toml unchanged.

Scenario: No change to the road map

  • WHEN git diff --exit-code origin/main -- .github/labels.yml .github/roadmap.toml runs on the reset commit
  • THEN the command exits 0 and prints nothing

Requirement: Git ignore

The reset MUST keep .gitignore and add node_modules/ to it.

Scenario: Node modules ignored

  • WHEN git check-ignore node_modules runs
  • THEN the command exits 0 and prints node_modules

Requirement: License attribution

LICENSE MUST keep the Copyright (c) 2022 Microsoft Corporation. line and add a second copyright line.

Scenario: Two copyright lines

  • WHEN grep -c '^Copyright (c)' LICENSE and grep -F 'Copyright (c) 2022 Microsoft Corporation.' LICENSE run
  • THEN the first command prints 2 and the second command exits 0

Requirement: Code owners

The repository CODEOWNERS file MUST hold * @dan-petty as its only rule.

Scenario: One owner rule

  • WHEN git ls-files '*CODEOWNERS' | xargs grep -v '^#' runs
  • THEN the output is exactly * @dan-petty

Requirement: CLI lockfile

The root package.json MUST declare @devcontainers/cli as a devDependency, and package-lock.json MUST pin the version that the workflows use.

Scenario: Lockfile version prints

  • WHEN npm ci runs at the root, then npx devcontainer --version runs
  • THEN the command prints the version that package-lock.json holds

Requirement: Renovate config

.github/renovate.json MUST extend github>dan-petty/devops-cli//.github/renovate/base.

Scenario: Config validator

  • WHEN npx renovate-config-validator .github/renovate.json runs
  • THEN the command exits 0 and reports a valid config

Requirement: Workflow lint

Every workflow under .github/workflows MUST pass actionlint.

Scenario: Actionlint on the workflows

  • WHEN actionlint .github/workflows runs
  • THEN the command exits 0 and reports no finding

Requirement: Shell lint

The lint workflow MUST run shellcheck on every tracked shell script.

Scenario: Zero scripts on the reset

  • WHEN git ls-files -z '*.sh' | xargs -0r shellcheck runs on the reset commit
  • THEN the command exits 0 and checks zero scripts

Requirement: Documentation drift

The lint workflow MUST fail when a generated Feature README differs from the commit.

Scenario: Stale README

  • WHEN a pull request changes src/<id>/devcontainer-feature.json without the regenerated README, and the docs step runs
  • THEN npx devcontainer features generate-docs -p src -n dan-petty/devcontainer-features --github-owner dan-petty --github-repo devcontainer-features followed by git diff --exit-code -- 'src/*/README.md' exits non-zero

Requirement: Version bump

The lint workflow MUST fail when a pull request changes src/<id>/ and keeps the version of origin/main.

Scenario: No version change

  • WHEN a pull request changes src/<id>/install.sh and devcontainer-feature.json keeps the version of origin/main, and the version step runs
  • THEN the step exits non-zero and prints the Feature id

Requirement: Devcontainer image

.devcontainer/devcontainer.json MUST use ghcr.io/dan-petty/devops-cli/devcontainer by digest until the devtools image exists.

Scenario: Pinned image

  • WHEN grep -E 'ghcr.io/dan-petty/devops-cli/devcontainer@sha256:[0-9a-f]{64}' .devcontainer/devcontainer.json runs
  • THEN the command exits 0

Requirement: README namespace

The root README.md MUST state the purpose and the usage ghcr.io/dan-petty/devcontainer-features/<id>:1.

Scenario: Namespace in the README

  • WHEN grep -F 'debian:sid' README.md and grep -F 'ghcr.io/dan-petty/devcontainer-features/<id>:1' README.md run
  • THEN both commands exit 0

Requirement: Local contributing guide

CONTRIBUTING.md MUST describe the local workflow: one issue per pull request, a semver bump for each src/<id>/ change, the regenerated README in the same pull request, and the test commands.

Scenario: Microsoft text replaced

  • WHEN grep -F 'Microsoft CLA' CONTRIBUTING.md and grep -F 'one issue per PR' CONTRIBUTING.md run
  • THEN the first command exits 1 and the second exits 0

Existing Tool Considered

No alternatives check ran before this proposal (alternatives is null). The open, maintained tools that cover the need are already in use: devcontainers/action@v1 for metadata validation and publish (.github/workflows/release.yaml:19, .github/workflows/validate-metadata-files.yml:13), @devcontainers/cli for docs generation and tests (CONTRIBUTING.md:58), dorny/paths-filter@v4 for change detection (.github/workflows/test-pr.yaml:11), shellcheck for shell lint (.github/workflows/linter-automated.yaml:15), and renovate for dependency updates. None of them fails on an unchanged Feature version: the publish action skips an exact version in silence, so lint.yaml adds about 10 lines of git and jq. That code costs about 4,000 tokens and 20 minutes to build, and about 2,000 tokens and 15 minutes a year to keep.

Key questions

  • Does an open action cover the version-bump gate?: No. The repository uses devcontainers/action@v1 only to publish, and it skips an exact version in silence; no open action for the gate was found. Write about 10 lines of git and jq in lint.yaml that compare the version in devcontainer-feature.json with origin/main when a pull request changes src/<id>/, README.md excepted. (best practice) [sources: .github/workflows/release.yaml:19, .github/workflows/update-documentation.yml:32]
    • Rejected: devcontainers/action@v1 publish-features. It skips an exact version with no error, so a stale version passes in silence.
    • Rejected: A marketplace action for version bumps. No open action for this check was found.
    • Chosen: A git and jq step in lint.yaml. It is about 10 lines, it has no dependency, and it fails the pull request.
  • How does test-pr.yaml select the Feature ids when PR 1 leaves src/ empty?: Use one dorny/paths-filter@v4 filter on src/**, then derive the changed Feature ids from git diff --name-only origin/main... -- 'src/*' in a step. An empty src/ then runs no test job. (best practice) [sources: .github/workflows/test-pr.yaml:11, .github/workflows/test-pr.yaml:15]
    • Rejected: Keep the 28 hard-coded filters of upstream. The reset removes those 28 Features, so the filters point at no directory.
    • Chosen: One src/** filter and a step that derives the ids from the diff. It needs no edit for each new Feature and it works with an empty src/.
    • Rejected: A matrix over every directory under src/. It tests unchanged Features on each pull request and it needs at least one Feature.
  • Which CLI version does release.yaml publish with?: The version in package-lock.json. The workflow runs npm ci, adds $PWD/node_modules/.bin to GITHUB_PATH, and then calls devcontainers/action@v1 publish-features. The action runs its global install only when no devcontainer is on PATH. (best practice) [sources: .github/workflows/release.yaml:19, .github/workflows/test-pr.yaml:76]
    • Rejected: Let the action run npm install -g @devcontainers/cli. That install is unpinned, so the published version floats.
    • Chosen: Put the lockfile CLI on GITHUB_PATH. The lockfile pins the version, and renovate bumps it with the npm manager.
  • Which base image and runner do the tests use?: debian:sid on ubuntu-latest. Drop the non-stock devcontainer-image-builder-ubuntu label. (best practice) [sources: .github/workflows/test-pr.yaml:46, .github/workflows/test-pr.yaml:83]
    • Rejected: Keep ubuntu-latest and the custom label. The label is not stock, so a fork cannot schedule the job.
    • Chosen: ubuntu-latest with debian:sid. The runner is stock, and sid is the target base image of the collection.
  • Which image does the repository devcontainer use until the devtools image exists?: ghcr.io/dan-petty/devops-cli/devcontainer by digest. It is public and has the devcontainer CLI, node, shellcheck and a Docker engine. renovate bumps the digest. (best practice) [sources: .devcontainer/devcontainer.json:2, .devcontainer/devcontainer.json:6]
    • Rejected: mcr.microsoft.com/devcontainers/base:ubuntu plus a Feature from ./src. The spec requires a local Feature under .devcontainer/, so ./src cannot hold it.
    • Rejected: The devtools image plus podman-in-podman:1. That image does not exist yet.
    • Chosen: The devops-cli image by digest. It exists, it is public, and it has the tools that the repository needs now.
  • Does the reset keep the MIT license and the Microsoft line?: Yes. Keep LICENSE as MIT with Copyright (c) 2022 Microsoft Corporation. and add the owner's copyright line. The entrypoints adapt docker-init.sh nesting (src/docker-in-docker/install.sh:1048) and the socat fallback (src/docker-outside-of-docker/install.sh:500), so the notice stays. (best practice) [sources: src/docker-in-docker/install.sh:1048, src/docker-outside-of-docker/install.sh:500]
    • Chosen: Keep MIT with both copyright lines. The entrypoints derive from Microsoft code, so the notice must stay.
    • Rejected: Replace the license with a new one. The derived code needs the Microsoft notice.
  • Who enables Actions and sets the workflow permissions?: The owner does it in Settings > Actions > General. Allow the actions and set the workflow permissions to read and write. The repository shows 0 runs, and the settings could not be read without auth. (a person decides)
  • Who makes the GHCR packages public, and when?: The owner does it after the first publish of release.yaml. Each package and the collection start private, and the change cannot be undone. (a person decides)
  • Who removes the inherited tags and branches, and when?: The owner does it before the first release tag. The repository holds 266 feature_* tags, the v0.0.x tags and 317 branches. The owner also leaves the fork network in Settings > Danger Zone, and that step is permanent. (a person decides)

Open questions

  • Who enables Actions and sets the workflow permissions? (a person decides)
  • Who makes the GHCR packages public, and when? (a person decides)
  • Who removes the inherited tags and branches, and when? (a person decides)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/chore
    source/agent
    status/new
    value/high
    on Nov 19, 2026
  2. dan-petty commented on Nov 19, 2026

    @dan-petty
    OwnerAuthor
  3. added
    effort/high
    priority/p2-medium
    on Nov 19, 2026
  4. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    Owner question: See the first point of Open questions in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  5. added
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 19, 2026
  6. removed
    status/in-review
    on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/highpriority/p2-mediumsource/agenttype/chorevalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions