Skip to content

feat(apps): enrich DockerHub images with OCI labels and Overview sync#36

Merged
jdwillmsen merged 5 commits into
mainfrom
feat/dockerhub-image-enrichment
Jul 1, 2026
Merged

feat(apps): enrich DockerHub images with OCI labels and Overview sync#36
jdwillmsen merged 5 commits into
mainfrom
feat/dockerhub-image-enrichment

Conversation

@jdwillmsen

Copy link
Copy Markdown
Member

Summary

Implements the approved DockerHub Image Enrichment design (docs/superpowers/specs/2026-06-30-dockerhub-image-enrichment-design.md) across all seven jdwlabs/* images.

Before: images were bare — only authdb had labels, and they were ad-hoc with a wrong MIT license; DockerHub repos had no Overview; no way to trace a pull back to a version/commit/build.

After: every image carries the full org.opencontainers.image.* set (incl. dynamic version/revision/created), and every DockerHub repo's Overview is synced from a source-controlled README.docker.md on release.

Components

  • scripts/build-image.sh — centralises the ten OCI labels and hands off to docker buildx. Callers pass --platform and --push/--load, so one script serves release (multi-arch push), local (--load), and authdb. A label change is now one edit instead of ten flags drifting across six project.json files.
  • scripts/update-description.sh — logs into the DockerHub API with the existing DOCKERHUB_USERNAME/DOCKERHUB_PASSWORD and PATCHes the repo Overview from README.docker.md; fails loudly on any non-2xx.
  • Wiring — six buildx images route both build-image and local-build-image through the script; usersrole (Jib) sets the same labels via jib.container.labels in build.gradle.kts. Each image's version target gains an update-description postTarget, so it fires only for affected/released apps.
  • README.docker.md ×7 — the Overview source of truth (badges, quick start, ports, env, tags, license).

Notable

  • authdb now pushes. Its build-image previously built to cache only (no --push/--load), so labels never reached the registry — corrected. Its Dockerfile LABELs are dropped in favour of the shared OCI set, fixing the stale MITPolyForm-Noncommercial-1.0.0.
  • Deviation from spec's positional contract: build-image.sh uses buildx-arg passthrough instead of a fixed positional signature, because real configs need per-image --push vs no-push vs --load and variable platforms — the positional form couldn't express that.

Verification

  • bash -n clean on both scripts; all 7 project.json parse.
  • build-image.sh shim test: 10 labels + both tags + multi-word description + git revision + flag passthrough all correct.
  • Real local build of authdb via the script → docker inspect shows all 10 labels resolved correctly (license fixed, revision = HEAD).
  • Multi-arch push + live Hub Overview PATCH run only on release in CI (need registry + creds); not exercised locally.

🤖 Generated with Claude Code

jdwillmsen and others added 5 commits June 30, 2026 21:52
build-image.sh centralises the ten org.opencontainers.image.* labels so a
label change is one edit instead of duplicated flags drifting across every
project.json; it derives revision/created and passes buildx flags through so
each call site owns --platform and --push/--load.

update-description.sh syncs a DockerHub repo Overview from a source-controlled
README.docker.md and fails loudly on any non-2xx so a broken sync surfaces in
CI rather than passing silently.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
One file per image, the source of truth update-description.sh pushes to each
DockerHub repo so the Overview never drifts from the repo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Route the six buildx images through scripts/build-image.sh (both build-image
and local-build-image, so labels are inspectable on local --load builds) and
set the same org.opencontainers.image.* set on usersrole via jib.container
.labels. Add an update-description postTarget to every image's version target
to sync each DockerHub Overview on release.

authdb build-image now pushes: it previously built to cache only, so its
labels never reached the registry. Its Dockerfile LABELs are dropped in favour
of the shared OCI set, correcting the stale MIT license to the org's actual
PolyForm-Noncommercial-1.0.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The `java` plugin extension shadows the java package inside build.gradle.kts,
so `java.time.Instant.now()` failed to resolve. Import Instant and reference it
unqualified.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Prettier expands the multi-item postTargets arrays to one entry per line.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jdwillmsen jdwillmsen merged commit 7e2db1b into main Jul 1, 2026
9 checks passed
@jdwillmsen jdwillmsen deleted the feat/dockerhub-image-enrichment branch July 1, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant