Harden zot registry, pt 1 #231

Merged
eblume merged 7 commits from feature/harden-zot-registry into main 2026-02-20 22:50:02 -08:00

7 commits

Author SHA1 Message Date
747e99f466 Complete add-container-version-sync-check Mikado card
All verification items pass: mismatch detection confirmed, ntfy nix
version resolved. All three prereqs (pin-container-versions,
add-dagger-nix-build, fix-ntfy-nix-version) are complete.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 22:22:07 -08:00
b98c6c1b3f Build ntfy nix container from forge mirror at v2.17.0
The nixpkgs ntfy-sh package is pinned at 2.15.0, creating a version
skew with the Dockerfile (v2.17.0). Replace the pkgs.ntfy-sh reference
with a custom derivation using fetchgit, buildNpmPackage, and
buildGoModule targeting the forge mirror. Update container-version-check
to extract versions from local nix files via regex before falling back
to the Dagger nix-version function.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 22:18:49 -08:00
6004652407 Add container-version-check pre-commit hook and populate service versions
Introduces a typer-based mise task that validates version consistency
across Dockerfiles, nix derivations, and service-versions.yaml for all
tracked containers. Populates current-version for all hybrid services.

Discovered ntfy nix version skew (2.15.0 vs Dockerfile 2.17.0) — fixing
forward with ntfy excluded from nix checks and a new Mikado dependency
card (fix-ntfy-nix-version) to resolve it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 21:01:07 -08:00
d368a07876 Pin container versions and add uniform CONTAINER_APP_VERSION
Every container Dockerfile now declares ARG CONTAINER_APP_VERSION=X.Y.Z
as the first ARG, enabling uniform version parsing for the sync check.
Containers that use the version in build commands chain it to a semantic
ARG (e.g., ARG NAVIDROME_VERSION=${CONTAINER_APP_VERSION}).

Version sources:
- cv: 1.0.3 (latest Forgejo generic package release)
- quartz: 1.28.2 (nginx stable, pinned FROM tag)
- devpi: 6.19.1 / 5.0.1 (devpi-server + devpi-web from PyPI)
- nettest: 0.1.0 (internal, no upstream)
- All others: existing versions carried forward

Mark pin-container-versions Mikado card as complete.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 20:24:54 -08:00
2b296b34a6 Update docs to reference new Dagger nix build functions
- dagger.md: add build_nix, nix_version, flake_lock to functions table
- build-container-image.md: document Dagger as local nix build option
- build-authentik-container.md: mention Dagger build path
- Mark add-dagger-nix-build card complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:46:57 -08:00
1556f86779 Add Dagger build_nix and nix_version functions
build_nix: builds nix containers inside nixos/nix:2.33.3 via Dagger,
resolving nixpkgs from the flake registry. Returns docker-archive tarball.

nix_version: extracts package version from nixpkgs (e.g., authentik ->
2025.10.1). Used by the container version sync check.

Tested: nettest builds successfully, ntfy-sh and authentik versions resolve.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:41:00 -08:00
0da5d8906c Add version-infrastructure prereqs to harden-zot-registry Mikado chain
Analysis of adopt-commit-based-container-tags revealed three new prerequisites:
- pin-container-versions: add version ARGs to devpi, cv, quartz Dockerfiles
- add-dagger-nix-build: Dagger functions for nix container builds and version extraction
- add-container-version-sync-check: pre-commit hook enforcing version consistency
  across Dockerfile ARGs, service-versions.yaml, and nix derivations

Eliminated the need for separate VERSION files — existing sources (Dockerfile
ARGs, nix derivations, service-versions.yaml) are the source of truth, with a
sync check enforcing consistency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:08:15 -08:00