Skip to content

ci(docker): add linux/arm64 to image builds (#3168)#3208

Open
abbyshekit wants to merge 1 commit intomainfrom
fix/arm64-docker-support
Open

ci(docker): add linux/arm64 to image builds (#3168)#3208
abbyshekit wants to merge 1 commit intomainfrom
fix/arm64-docker-support

Conversation

@abbyshekit
Copy link
Copy Markdown

Summary

Closes #3168.

IronClaw ships only `linux/amd64` Docker images today, blocking native runs on Apple Silicon, AWS Graviton, Raspberry Pi 4/5, and the broader arm64 fleet. Cranelift (the WASM JIT) already supports `aarch64`, so the gap is purely in the publish matrix.

What this changes

  • .github/workflows/docker.yml — adds `docker/setup-qemu-action` (pinned by SHA) and switches both image builds (`ironclaw` + `ironclaw-worker`) to `platforms: linux/amd64,linux/arm64`.
  • .github/workflows/rebuild-release-image.yml — same treatment for both build paths (`runtime` target + final-stage fallback).
  • Dockerfile header — removed the `--platform linux/amd64` example (host-arch is the right default for a developer once the official images go multi-arch) and added a Buildx multi-arch example.

Cost / risk

QEMU emulation on the amd64 runner adds roughly 2-3x to the arm64 build time vs amd64. If that bites CI minutes, the right next step is provisioning a native arm64 runner (the inline comment in both workflows points at this). Until then, emulation is the correct tradeoff for parity.

Confirmation

@gcaguilar's PoC fork run already showed this works end-to-end: https://github.com/gcaguilar/ironclaw/actions/runs/25252983548. Only armv7 (32-bit) is blocked, which is tracked separately in #1339.

Test plan

  • Trigger `docker.yml` on this branch via `workflow_dispatch` (a Docker Hub login secret is required so I can't trigger it from a fork PR — needs a maintainer with publish rights to kick it off)
  • Verify the resulting manifest list has both architectures: `docker manifest inspect nearaidev/ironclaw:sha-<7chars>`
  • Smoke-test the arm64 image on an Apple Silicon machine: `docker run --platform linux/arm64 --rm nearaidev/ironclaw:sha-<7chars> ironclaw --version`

🤖 Generated with Claude Code

IronClaw ships only linux/amd64 Docker images today, blocking native
runs on Apple Silicon, Graviton, and Raspberry Pi 4/5 (arm64). The
Cranelift backend already supports aarch64, so the gap is purely in
the build matrix.

This adds linux/arm64 to both image builds:
  - .github/workflows/docker.yml (regular + worker)
  - .github/workflows/rebuild-release-image.yml (runtime + final)

Plus a docker/setup-qemu-action step before each Buildx setup so the
amd64 GitHub runner can emit the arm64 image via emulation. The
inline comment notes the ~2-3x build-time hit and suggests swapping
to a native arm64 runner if/when one is available.

Dockerfile header comment: removed the `--platform linux/amd64`
example (host-arch is the right default once the official images
go multi-arch) and added a multi-arch buildx example.

Confirmed feasible by @gcaguilar's PoC fork; only armv7 (32-bit) is
blocked, tracked separately in #1339.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added scope: sandbox Docker sandbox scope: ci CI/CD workflows size: S 10-49 changed lines risk: medium Business logic, config, or moderate-risk modules contributor: new First-time contributor labels May 2, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the build instructions in the Dockerfile to include commands for both host-architecture and multi-architecture builds using Docker Buildx. There are no review comments to address, and I have no feedback to provide.

@gcaguilar
Copy link
Copy Markdown

Maybe it would be better to do a native build instead of using QEMU,
Here you can check https://github.com/gcaguilar/ironclaw/actions/runs/25252983548

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: new First-time contributor risk: medium Business logic, config, or moderate-risk modules scope: ci CI/CD workflows scope: sandbox Docker sandbox size: S 10-49 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add arm64/aarch64 platform support for Docker builds

2 participants