feat/container-image #63

Merged
xavier merged 3 commits from feat/container-image into dev 2026-11-20 00:07:44 +01:00
Owner
No description provided.
The Dockerfile: alpine 3.21, the CI-stamped release binary in one
layer (COPY --chmod via TARGETARCH — two copies, not two compiles; no
second stamping context, «the image reports the release» by
construction), RUN-free (the base already carries the CA bundle and
the shell — no build-time execution, no emulation on either leg),
VOLUME /var/lib/skuld («state rides the volume»), ENTRYPOINT skuld +
CMD serve --data /var/lib/skuld --bind 0.0.0.0:8420 (the ruled wide
bind — a container's loopback is unreachable through published ports),
NO EXPOSE (the boundary is the operator's explicit publication).

The CI channel: the image job rides the tag-push workflow behind
build+secrets-scan, consuming the matrix's stamped linux artifacts
into a clean two-binary context, buildx pushing one OCI index
(linux/amd64+arm64, per-arch digests) to
forgejo.xreveillon.eu/assistant/skuld:vX.Y.Z; the docker CLI and
buildx plugin are installed checksum-pinned (the gitleaks pattern —
the pins computed from the real upstream artifacts), the registry
credential the Principal's CONTAINER_REGISTRY_AUTH secret
("<username>:<token>", documented in-file). The alias job rides MAIN
pushes behind test+secrets-scan and builds NOTHING: verify main's tip
matches a release tag (loud failure otherwise — the backstop behind
«tag first, then advance main»), then re-point latest to that tag's
index by fetching the exact bytes and PUTting them, proven by digest
equality. The build matrix skips main; main runs the gates only.
Triggers: branches [dev, main], tags v*.

Contract pins extend the release-audit test: six jobs in order, the
image job's gate/needs/registry/platforms/secret/carried-binaries, the
alias job's gate/needs/verify/loud-failure/re-point/digest-proof and
its builds-nothing rule, the build job's main exclusion, and the
Dockerfile's own shape (alpine, carried binary, volume, entrypoint,
default command with the wide bind, no EXPOSE, no go build, no RUN).

Smoke-verified locally against a real registry: two stamped binaries
into the context, the multi-platform index pushed (one manifest list,
both arches present), serve up with the wide bind reachable only
through a published port (401 = the token demand answering),
--version answering the stamped release, /var/lib/skuld living with
the three DBs, the full console-verb cold cadence through run-form
administration on the same volume (the registry lock's honest refusal
fired first — a running serve cannot be administered), the alias
re-point digest-equal, and the tip guard firing loud on an untagged
tip.

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
container-image: the clean two-entry index and the noun-level --data in the exec docs
All checks were successful
/ secrets-scan (gitleaks 8.28.0, all refs, redacted) (pull_request) Successful in 6s
/ test (linux/amd64, full suite) (pull_request) Successful in 1m38s
/ alias (re-point latest, main pushes only) (pull_request) Has been skipped
/ build linux/amd64 (pull_request) Successful in 1m2s
/ build darwin/amd64 (pull_request) Successful in 1m4s
/ build windows/amd64 (pull_request) Successful in 1m9s
/ build darwin/arm64 (pull_request) Successful in 1m10s
/ build windows/arm64 (pull_request) Successful in 57s
/ build linux/arm64 (pull_request) Successful in 1m0s
/ release (six binaries + checksums.txt, tag pushes only) (pull_request) Has been skipped
/ image (the release container, tag pushes only) (pull_request) Has been skipped
52f101014a
The reviewer's two nits, one commit: the image job's buildx build
gains --provenance=false — the provenance attestations are unsigned
claims with no verification story, so the index ships exactly its two
per-arch images (the digest-pinning hygiene; re-enabling is one flag
if a verification story ever lands), pinned in the image-job contract
test. The Dockerfile's exec example moves --data to the noun level
(before the subcommand, the machines usage line's own shape) and
states the exec/run asymmetry: the binary name written in exec,
supplied by the ENTRYPOINT in run, and the administer leg named the
run form — exec cannot reach a stopped container.

(Recorded honestly: the binary accepts both --data placements — cobra
parses inherited persistent flags after the subcommand too; the fix
normalizes the documented form to the noun-level shape, not a repair
of a rejecting one.)

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
container-image: the registry credential moves to the estate's three-part layout
All checks were successful
/ secrets-scan (gitleaks 8.28.0, all refs, redacted) (pull_request) Successful in 7s
/ test (linux/amd64, full suite) (pull_request) Successful in 1m52s
/ alias (re-point latest, main pushes only) (pull_request) Has been skipped
/ build linux/amd64 (pull_request) Successful in 59s
/ build windows/amd64 (pull_request) Successful in 1m3s
/ build darwin/amd64 (pull_request) Successful in 1m6s
/ build darwin/arm64 (pull_request) Successful in 1m3s
/ build linux/arm64 (pull_request) Successful in 59s
/ build windows/arm64 (pull_request) Successful in 59s
/ release (six binaries + checksums.txt, tag pushes only) (pull_request) Has been skipped
/ image (the release container, tag pushes only) (pull_request) Has been skipped
bcf85e3d24
The Principal's auth convention, one fold: CONTAINER_REGISTRY_AUTH
(the combined "user:token" blob, split on the first colon) is out.
In: the repo VARIABLE PACKAGES_REGISTRY naming the registry host and
the repo secrets PACKAGES_USER + PACKAGES_TOKEN — the image job's
reference composes ${{ vars.PACKAGES_REGISTRY }}/assistant/skuld
where the workflow names it, docker login takes -u "$PACKAGES_USER"
with the token on stdin, and the alias job's bearer dance composes
"$PACKAGES_USER:$PACKAGES_TOKEN" at the point of use. No stored
combined blob anywhere. The setup comments rewritten to the
three-part form, and each job's auth step checks the three parts
INDIVIDUALLY — a miss fails loud naming which is missing and what the
Principal sets there. The alias job's dead IMAGE env (never read)
drops with the fold. The contract pins follow: the variable and both
secrets asserted in each auth-carrying job, the composed reference
pinned, and a negative pin — the old secret's name ships nowhere in
the workflow.

Co-Authored-By: Xavier's assistant <assistant@gijoe88.com>
xavier deleted branch feat/container-image 2026-11-20 00:07:44 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
assistant/skuld!63
No description provided.