ci: publish multi-arch (amd64 + arm64) container images - #37
Merged
Merged
Conversation
Build each platform on its own native runner (ubuntu-latest for amd64, ubuntu-24.04-arm for arm64), push by digest, then assemble a manifest list per tag with `docker buildx imagetools create`. No QEMU: a Magento composer install plus sample data under emulation is far too slow to be worth it, and arm runners are free on public repos. Dockerfiles are unchanged — the base is php:8.2-apache plus apt packages and extensions built from source, and composer comes from the multi-arch composer:2 image, so nothing was arch-specific. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GFS4uN8RLpnbeLmvmB2Rbu
This was referenced Sep 18, 2026
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.
ghcr.io/brtkwr/magento-baseandghcr.io/brtkwr/magentoare amd64-only today, so on Apple Silicon they run under QEMU and everything is slow. This makes both publish a manifest list withlinux/amd64andlinux/arm64.How
Each of the four
docker/build-push-actionsteps (base and Magento, inci.yamlandrelease.yaml) becomes a matrix over platform, with a dependent merge job:ubuntu-latestfor amd64,ubuntu-24.04-armfor arm64. No QEMU: a Magento composer install plus sample data under emulation is far too slow, and arm runners are free on public repos.push-by-digest=true,name-canonical=true, notags:) and uploads the digest as an artifact.docker buildx imagetools createto assemble the manifest list under the real tags. This is the pattern from the docker/build-push-action multi-platform docs.Details worth noting:
FROMthe base, so it now depends ondocker-base-mergerather than the per-platform base jobs — the base manifest list has to exist before an arm64 Magento build can resolve its parent.type=ghacache scope, otherwise the jobs overwrite each other's cache.composer_authsecret is untouched in both files: still the inline JSON string inci.yaml, still thejq-generatedauth.jsonfile inrelease.yaml.php:8.2-apacheplus apt packages and PHP extensions built from source, with composer copied from the multi-archcomposer:2image; the Magento file is composer packages only. Nothing pulls an x86 binary.# Build:comment lines in both Dockerfiles and the buildx examples in the README now show--platform linux/amd64,linux/arm64.What this PR run can and cannot prove
ci.yaml's image jobs only run on pushes tomain(github.event_name == 'push' && github.ref == 'refs/heads/main'), so on this PR they are skipped entirely — not built-without-pushing. The PR run proves the chart lint, the Dockerfile lint, and that the workflows parse and schedule.The real acceptance test only happens after merge:
That prints only
amd64for every tag today; two architectures per tag is the bar.Out of scope (follow-ups)
two-inc/magento-docker, which buildsFROM ghcr.io/brtkwr/magento:2.4.8and declares no platforms.two-inc/magento-plugin's Makefile, which pins the amd64-onlymichielgerritsen/magento-project-community-editionfor the local dev shop.Nothing downstream can go arm64 until these images publish it, so this goes first.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GFS4uN8RLpnbeLmvmB2Rbu