Skip to content

build(docker): one multi-arch image for amd64 and arm64 - #8

Closed
xgreenx wants to merge 4 commits into
feat/jwks-prover-in-keeperfrom
build/multi-arch-image
Closed

xgreenx wants to merge 4 commits into
feat/jwks-prover-in-keeperfrom
build/multi-arch-image

Conversation

@xgreenx

@xgreenx xgreenx commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

One ghcr.io/libid-org/keeper:<tag> must run on GitHub runners, EKS nodes of either architecture and Apple Silicon, as libid-org/notary#10 does. Stacked on #7.

Changes

  • Dockerfile pins both base images by the digest of their multi-platform index and carries the docker run recipe.
  • .dockerignore allowlists the three paths the build copies; the local context drops from 3.6 GB to 265 kB.
  • Startup check: run/once without --dry-run refuse a config missing notary_url or a gas signer, instead of failing at the first rotation weeks later.
  • Missing config file now names where its path came from and where to mount one.
  • release.yml / docker-custom.yml build each platform natively (ubuntu-24.04, ubuntu-24.04-arm), push by digest, join both under one manifest list. No QEMU.
  • Every action pinned to a full commit SHA, each re-resolved against its tag.

Verified

  • cargo test --all: 31 unit + 4 integration pass, 4 of them new. Clippy -D warnings and nightly fmt clean.
  • actionlint clean on all four workflows.
  • linux/arm64 built natively on an M-series Mac: 150 MB, uid 10001.
  • CI published custom-0afb69c as one manifest list, linux/amd64 + linux/arm64, both built natively. Digests in the comment below.
  • On that image: no config, no notary_url, no signer each exit 1 with the intended message, and once --dry-run polls Google's live JWKS for its two real kids.

Not verified / known issues

  • Nothing is released from this branch, so the release-tag join has never executed.
  • E2E is red, inherited from feat(jwks): the JWKS prover and its mock live here, on libid-rs #7: LIBID_DEPLOY_URL names chain-configurations v0.7.0, not released yet.
  • Per-platform images stay untagged in ghcr; an "untagged" retention policy would break every tag.

A tag alone lets the builder and the runtime drift under a rebuild; the
digest of each multi-platform index fixes every architecture at once.
The header now carries the docker run recipe the image expects.

Signed-off-by: xgreenx <xgreenx9999@gmail.com>
Assisted-by: Claude Fable 5.1
One tag must pull on GitHub runners, EKS nodes of either architecture
and Apple Silicon. Each platform compiles natively on a runner of its
own architecture and pushes by digest; a final job joins the digests
under the tag. QEMU is not used: an emulated tlsn/mpz build costs
hours, while ubuntu-24.04-arm is native and free for a public repo.
Same shape as libid-org/notary#10.

Signed-off-by: xgreenx <xgreenx9999@gmail.com>
Assisted-by: Claude Fable 5.1
A missing notary_url or gas signer used to surface only when a
rotation was due, weeks after the deployment looked healthy. `run`
and `once` without --dry-run now check both at startup, and a config
file that does not exist says where its path came from.

Signed-off-by: xgreenx <xgreenx9999@gmail.com>
Assisted-by: Claude Fable 5.1
The image needs Cargo.toml, Cargo.lock and src/ and nothing else. Without
a .dockerignore a local build ships target/ to the daemon as well -- 3.6 GB
against 265 kB here -- for files no stage copies.

Assisted-by: Claude Opus 5
Signed-off-by: xgreenx <xgreenx9999@gmail.com>
@xgreenx

xgreenx commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Multi-arch proof for 0afb69c: Custom Docker image runghcr.io/libid-org/keeper:custom-0afb69c

  • Manifest list sha256:cd05c938… with exactly two entries: linux/amd64 caa83988…, linux/arm64 019f0ef3….
  • Native builds: arm64 4m30s on ubuntu-24.04-arm, amd64 5m47s on ubuntu-24.04; no QEMU.
  • Pulled on Apple Silicon: resolves to arm64, 150 MB, uid 10001; --version ok; missing config exits 1 with the hint.
  • amd64 entry under emulation on the same Mac: uname -m = x86_64, --version ok, same missing-config message.

@xgreenx

xgreenx commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #9, which is now a single PR against main containing this branch's commits unchanged. Branch kept.

@xgreenx xgreenx closed this Sep 14, 2026
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