feat: publish multi-arch client images #54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/multiarch-images"
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?
Why
The first
publish-imagesrun after #53 failed at the Dockerfile's firstRUNwithexec /bin/sh: exec format error: the runner is arm64, notamd64 as #53 assumed, and could not run the amd64 base image. The runner
host now has
qemu-user-binfmt, and inside its dind servicedocker run --platform linux/amd64 ubuntu:26.04 uname -mprintsx86_64. Since the runner builds arm64 natively, the images now coverboth platforms, so Linux arm64 hosts stop building locally too. Building
amd64 only was set aside because arm64 hosts would keep building, and
arm64 only because amd64 hosts would go back to building.
What changed
The workflow builds every client for linux/amd64 (emulated) and
linux/arm64 as
<image>:latest-<arch>. Only after all six builds doesit push them, and only after every push does it join each pair into one
manifest tagged
latestand the client version. A failed buildpublishes nothing, and a failed push leaves the public
latestandversion tags as they were. The job checks that buildx is available
before it builds anything.
install.shnow pulls on Linux amd64 and arm64 hosts. macOS and otherarchitectures still build locally. The README names the architectures
that pull. The development guide describes the per-platform builds, the
manifests, and the QEMU emulator the runner's machine needs, with a
check of it.
How to verify
publish-imagesfrom the Actions tab. It shouldend green. Each of
codex-cli,claude-codeandopencode-clishould show
latest, a version tag,latest-amd64andlatest-arm64, anddocker buildx imagetools inspect git.unitoo.it/claudiomaradonna/claude-code:latestshould listlinux/amd64andlinux/arm64../install.sh claude.It should print
Pulling claude image ...and build nothing. Onmasterthe same command builds the image.make lint && .agents/hooks/shellcheck.sh repo && make testpasses onthe tip. The rewritten
tests/unit/test_publish.shtests and the arm64pull test fail on
master. Not tried: the workflow on the real runner,and
make test-e2e, which needs real rootless Podman.Considerations
Three of the six builds run under QEMU and are much slower. Whether
timeout-minutes: 120is enough will only show on the first run.latest-<arch>tags stay visible in the registry. In exchange, thescript works with any image store on the dind daemon. Hosts still trust
whatever was last pushed, now on arm64 as well. The build-to-push window
is wider, so this still assumes the runner's dind daemon is not shared
with untrusted jobs.