Skip to content

Add multi-platform Docker build support via setup-buildx target#91

Merged
d3mocide merged 1 commit into
mainfrom
claude/dreamy-hypatia-DjoN3
May 31, 2026
Merged

Add multi-platform Docker build support via setup-buildx target#91
d3mocide merged 1 commit into
mainfrom
claude/dreamy-hypatia-DjoN3

Conversation

@d3mocide
Copy link
Copy Markdown
Owner

Summary

Adds a new setup-buildx Makefile target that registers QEMU binfmt handlers for multi-platform (amd64/arm64) Docker builds, and makes it a prerequisite for build, prod, and dev targets to ensure cross-platform compatibility is initialized before any image builds.

Changes

  • New setup-buildx target: Runs docker run --rm --privileged tonistiigi/binfmt --install all to register QEMU binary format handlers, enabling seamless multi-platform image builds on non-native architectures
  • Updated .PHONY declaration: Added setup-buildx to the list of phony targets
  • Made setup-buildx a prerequisite: All image-building targets (build, prod, dev) now depend on setup-buildx to guarantee multi-platform support is available before Docker Compose operations

Implementation Details

This change ensures that when developers or CI/CD pipelines run make build, make prod, or make dev, the QEMU binfmt handlers are automatically registered first. This is essential for the project's multi-platform Docker Compose setup (amd64/arm64) to work correctly, particularly when building on non-native architectures like ARM64 systems building amd64 images or vice versa.

The tonistiigi/binfmt image is the standard tool for this purpose and is run with --privileged to allow kernel module registration.

https://claude.ai/code/session_01FkpycXAXX1oB5Ut9TSZWDU

Without QEMU binfmt handlers, arm64 layers fail with "exec format error"
on amd64 build hosts. setup-buildx target runs tonistiigi/binfmt --install
all before any docker compose build.

https://claude.ai/code/session_01FkpycXAXX1oB5Ut9TSZWDU
@d3mocide d3mocide merged commit 141f723 into main May 31, 2026
6 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