Repository navigation
ci: publish linux/arm64 Docker images - #6
Merged
Merged
Conversation
Cross-compile in the build stage on $BUILDPLATFORM so multi-arch builds need no emulation, publish linux/amd64 and linux/arm64 to GHCR, and build both platforms in the CI docker job.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dockerfile: the build stage runs on$BUILDPLATFORMand cross-compiles withGOOS=$TARGETOS GOARCH=$TARGETARCH. The runtime stage (distroless/static) only copies files, so multi-arch builds need no QEMU.docker-publish.yml: publishes alinux/amd64,linux/arm64manifest list. Tag rules are unchanged (main→latest+sha-<commit>; releases →<tag>+sha-<commit>).ci.yml: thedockerjob builds both platforms with buildx (no push), so arm64 breakage fails the PR instead of publishing.amd64andarm64.arm64 matches the existing
linux_arm64release archive; 32-bitarm/v7is out of scope.Verification
actionlintclean.docker-containerbuild of both platforms: one compile stage on the amd64 host (linux/amd64->arm64). In the OCI index, both platforms'steady-proxyandtestupstreamhave matching ELF machine types (0x3e/0xb7) andGOARCH,CGO_ENABLED=0, embedded commit,nonroot:nonroot, and entrypoint/steady-proxy.docker build .: the image prints the correct--versionand serves/__version;docker compose -f docker-compose.test.yml config -qpasses.Note
Local builds now need BuildKit, the default since Docker Engine 23 and always used by Compose v2. The legacy builder (
DOCKER_BUILDKIT=0) fails onFROM --platform=$BUILDPLATFORM.