feat/container-image #63
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/container-image"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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>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>