Skip to content

ci: build multi-arch Docker image (amd64 + arm64)#6

Merged
tbille merged 1 commit into
mainfrom
ci/multi-arch-docker-build
May 20, 2026
Merged

ci: build multi-arch Docker image (amd64 + arm64)#6
tbille merged 1 commit into
mainfrom
ci/multi-arch-docker-build

Conversation

@tbille

@tbille tbille commented May 20, 2026

Copy link
Copy Markdown
Member

Problem

Pulling mzdotai/otari-sandbox-container on Apple Silicon (arm64) Macs fails with:

no matching manifest for linux/arm64/v8 in the manifest list entries

The CI pipeline only builds and pushes linux/amd64 images because the docker/build-push-action step has no platforms: key.

Fix

Two changes to .github/workflows/build-and-push.yml:

  1. Add docker/setup-qemu-action@v4 (latest) — installs QEMU user-static binaries so buildx can cross-compile for arm64 on the amd64 GitHub runner.
  2. Add platforms: linux/amd64,linux/arm64 to the docker/build-push-action step — produces a multi-arch manifest with images for both architectures.

No Dockerfile changes needed — the base image (python:3.12-slim) and all installed packages already support arm64.

Trade-offs

  • CI build time will increase due to QEMU-emulated arm64 compilation of native extensions (numpy, scipy, scikit-learn, etc.). Estimated ~15-25 min total vs ~5 min previously.
  • This can be mitigated later with native arm64 runners or a matrix strategy, but the QEMU approach works immediately with no infrastructure changes.

Add QEMU emulation (docker/setup-qemu-action@v4) and set
platforms: linux/amd64,linux/arm64 in the build-push step so
the published Docker Hub image includes an arm64 manifest.

This fixes 'no matching manifest for linux/arm64/v8' errors when
pulling the image on Apple Silicon Macs.
@tbille tbille merged commit 4328ee4 into main May 20, 2026
2 checks passed
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.

2 participants