Skip to content

build(docker): build the runner image FROM devtools with no tool install #4361

Description

@dan-petty

Problem

The root Dockerfile installs tools itself: a gh curl and sha256 block (:37-56), the actionlint stage, the runner-tools stage (:90-97), the builder devops install-tools RUN for openspec (:68-97), and the kubectl and helm install-tools and --check RUNs of mcp-server (:172-192). A src-only change runs these steps again (job 135032250535: 3.0 + 11.9 + 13.2 s plus the smoke RUN). Each tool version has a copy that a person keeps, and gh has no Renovate updater.

The earlier design of this issue used ADD --checksum with hand-written URL and sha256 lines and Dockerfile-scanning invariant tests. The owner rule of 2026-11-16 (no config-value tests) and the owner decisions of 2026-11-19 (the devtools image; devops-cli is not a package manager) replace it.

Change

Owner decisions of 2026-11-19:

  • The Job images that change git build FROM the devtools image by digest, and Renovate bumps it. That is the runner image, which the stage, implement and fix-checks Jobs use.
  • The Service and MCP server images stay on python:3.14-slim-trixie with the full Trivy gate.
  • apt-get upgrade goes from the images built FROM devtools, because devtools rebuilds daily. It stays in the trixie images.
  • Trivy finds no OS-package CVEs on debian:sid (measured: 0 findings in 444 packages; with --distro debian/14, 941 findings, 940 with no fix). Record that gap in the relaxation table of SECURITY.md (docs(security): when a control changes for a dev resource or sandbox #5447): scope: the devcontainer image and the runner image (stage, implement and fix-checks Jobs); compensating control: the Job sandbox with no Secrets, a scoped token and the NetworkPolicy; owner approval of 2026-11-19. Owner decision of 2026-11-19 (feat: build and publish the devtools image from debian sid devtools#3): the findings of the tool binaries that come FROM devtools are report-only. So the runner scan runs two times: a report-only scan of the whole image (exit-code 0, SARIF), and the gate scan (HIGH,CRITICAL, ignore-unfixed, exit-code 1, thresholds unchanged) that skips the devtools tool binaries and so still gates the Python and npm packages of the image. Record this as the second entry of the table (docs(security): when a control changes for a dev resource or sandbox #5447).

Root Dockerfile:

  1. runner-deps becomes FROM ghcr.io/dan-petty/devtools:<tag>@sha256:<digest>. Keep the lock stage, the dependency venv (COPY --link, a uv cache mount on /root/.cache/uv and bind mounts of uv.lock and pyproject.toml), the project layer last, and USER 1000:1000 (the runner adds its own uid 1000 user, devops). Set UV_PYTHON (Dockerfile:149) to the devtools Python.
  2. Delete the builder install-tools RUN (:68-97), the runner-tools stage, the actionlint stage, the gh curl block (:37-56), the install-tools and --check RUNs of mcp-server (:172-192) and the runner_tools smoke RUN (:166).
  3. mcp-server no longer builds FROM runner. It builds on python:3.14-slim-trixie with the project venv, as the service image does, and copies the static tools that it calls (kubectl, helm and gh; confirm the list in the PR) from the devtools image with COPY --link --from=ghcr.io/dan-petty/devtools@sha256:<digest>.
  4. Service image (python:3.14-slim-trixie@<digest>): replace the gh curl and sha256 step with COPY --link --from=ghcr.io/dan-petty/devtools@sha256:<digest> /usr/local/bin/gh. node stays from the official node image by digest: a sid apt node needs libnode137 and glibc 2.43, and trixie has 2.41. openspec comes as its npm package tree copied from devtools, and the official node binary runs it. Test this in the image.
  5. In the image-smoke action (ci(image): move the image checks to one path-filtered workflow #1858), replace python -m devops_cli.roadmap.runner_tools and install-tools --check with <tool> --version. Replace ci.yml:729-730 and release.yml:666-667 with kubectl version --client and helm version. Change the .trivyignore.yaml paths (ci(security): scan each image with one Trivy action and SARIF #6405) to the new tool paths.
  6. Tests: delete tests/invariants/test_mcp_server_image.py:94-111 (kubectl and helm floors read from tools.lock). Owner decision of 2026-11-19: delete the gh floor tests of the Dockerfile (test_service_image.py:21-31, 70-143).
  7. Update the specs container-image-layers and mcp-server-image.

After the merge, the runner holds the review scanners and kube-linter, so close #6263, #5394 and #3562 as done. The bump issues #6084, #6365, #6366, #5866 and #3920 then become Renovate PRs in dan-petty/devtools.

Later measure: #4649 (one bake call) measures again after this item. mcp-server then no longer repeats the runner build.

Renovate. The dockerfile manager bumps every devtools FROM and COPY --from digest in the devtools group rule of #6414. Rewrite the description of packageRule 10 (dockerfile manager on Dockerfile is fix(deps)) to name the devtools base. Remove packageRule 16 (cli/cli), which then matches nothing. Rewrite packageRule 15 (uv), which then covers only the service path. The UV_VERSION and NODE_MAJOR custom managers (renovate.json:42-58) go with #5585.

Risk. Medium to high. The devtools Go binaries can carry fixed HIGH and CRITICAL findings (440 measured in the devcontainer /usr/local/bin), so the runner gate can fail until the upstream projects release fixes. The runner, stage, implement and fix-checks Jobs all change. The image size and the layer cache change. The service and mcp-server images must keep gh, openspec, kubectl and helm. The first node pull grows once.

Proof

  • docker buildx build for --target runner, mcp-server and service passes.
  • The Trivy gate scans of the runner, mcp-server and service images pass at their unchanged thresholds; the report-only scan of the runner uploads its SARIF.
  • docker run --rm <mcp-server> kubectl version --client and helm version exit 0, and the <tool> --version checks of image-smoke pass.
  • git grep -n 'install-tools' origin/main -- Dockerfile returns nothing.
  • A src-only PR rebuilds only the project layer (docker build cache report). The 3 image jobs stay under 6 min.
  • SECURITY.md holds the relaxation entry with scope, control, evidence, approval and review date.

Depends on: #5585, dan-petty/devtools#1, #6414, #6405, #1858, #6407, #6408, #5447

Alternatives check of 2026-11-19: partly.
Tool: jdx/mise (https://github.com/jdx/mise), MIT, last activity 2026-11-19, maintained.
Reason: Searches found mise, an open and maintained polyglot dev-tool manager. It can pin and install the CLI tools from one mise.toml and lockfile that Renovate updates, but it installs at build time and gives no prebuilt base image.

Covers:

  • One mise.toml pins every CLI tool version
  • mise.lok records the resolved versions
  • Renovate mise manager bumps the pins

Lacks:

  • No prebuilt image with tools baked in
  • No digest-pinned FROM or layer cache win
  • No Trivy gate or OS-package relaxation

Activity

  1. added
    source/agent
    type/chore
    scope/docker
    status/new
    value/medium
    effort/medium
    on Nov 10, 2026
  2. dan-petty commented on Nov 10, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/chore. The chore prefix of the title gives the type.
    • Scope: scope/docker. The (docker) scope of the title gives the scope.
    • Priority: P3-Low. This is a cleanup that swaps a working custom command for native steps with no functional change.
    • Value: Medium. It removes a custom dependency from build and CI paths and standardises tool installation.
    • Effort: Medium. About 19 call sites across the Dockerfile, ci.yml and two devcontainer actions each need a native equivalent.
    • Related: fix(devcontainer): the image holds the locked tools in standard locations #4359, which asks for a different change. Both replace devops install-tools with native package-manager steps, but #4359 covers the devcontainer image and the candidate covers the root Dockerfile and CI workflows.
  3. added
    priority/p3-low
    on Nov 10, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 10, 2026
  5. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 1ca0133 (see proposed design in issue body).

  6. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Alternatives check: not-applicable

    Class: chore. The check makes no search and no model call for an item of this class.

    Tool: none found

    Checked on 2026-11-11. A person decides what this means for the item. The check changes no label and closes no issue.

  7. dan-petty commented on Nov 17, 2026

    @dan-petty
    OwnerAuthor

    Owner direction of 2026-11-17 and the recommendation to install the tools with mise (one mise.toml and mise.lock, Renovate's mise manager) in place of hand-written download steps: see the comment on #4363.

  8. changed the title [-]chore(docker): the root Dockerfile and CI install tools with native steps[/-] [+]build(docker): build the runner image FROM devtools with no tool install[/+] on Nov 19, 2026
  9. dan-petty commented on Nov 19, 2026

    @dan-petty
    OwnerAuthor

    Three text points from the last review of PR #6403 (#5585). This item rewrites the same lines, so fix them here:

    • Dockerfile:166 and docs/CLUSTER.md:68 say that the Dockerfile and tools.lock hold the only pins. uv.lock also pins the dev dependencies that the runner check compares. After this item, say where each tool version comes from (devtools image, uv.lock) and copy no version.
    • The requirement "Every pin of the repository has a Renovate manager" (openspec/specs/release-concurrency-and-renovate/spec.md:47) does not name the gh download of the Dockerfile, which no manager reads (docs/SDLC.md:334 says that a person bumps it). This item moves gh into the devtools image, so the requirement is true again; remove the SDLC.md sentence then.
    • .github/renovate.json:245 and :251 (uv and node group descriptions) have sentences of 33 words, and the docs/SDLC.md sentence that starts "A group takes the prefix of its first update" has 49. ASD-STE100 allows 25 words in a descriptive sentence.
  10. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: not-applicable, no tool. A person decides what the new result means for the item.

    Searches (9)

    Tools considered:

    Searches run:

    • mise tool version manager install CLI tools Dockerfile mise.toml lockfile, results: 5
    • mise-en-place dev tool manager asdf alternative lockfile, results: 5
    • Renovate mise manager mise.lock update tools, results: 5
    • aqua declarative CLI tool version manager lockfile, results: 5
    • jdx mise, results: 5
    • mise.lock mise.toml renovate manager docs, results: 5
    • mise install kubectl helm gh actionlint tools, results: 5
    • mise.jdx.dev dev tools, results: 5
    • mise github backend install tools from releases, results: 5

    Sources:

  11. dan-petty commented on Nov 20, 2026

    @dan-petty
    OwnerAuthor

    Order change (2026-11-20): the owner asked for the clean-up of the root Dockerfile with the devtools image now. This item goes before #1858, #6407 and #6408. It changes the image smoke steps of ci.yml and release.yml in place (step 5), because the image-smoke action of #1858 does not exist yet. #1858, #6407 and #6408 rebase onto it. #6468 (the tmpfs form of the same smoke steps) merges first.

  12. added
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 20, 2026
  13. removed
    status/in-review
    on Nov 20, 2026
  14. added a commit that references this issue on Nov 20, 2026
  15. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-20 16:25 UTC

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/mediumpriority/p3-lowscope/dockersource/agenttype/chorevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions