ARM64 Docker builds are failing because we're building on AMD64 hosts without proper cross-platform build support.
Error
The requested image's platform (linux/arm64/v8) does not match
the detected host platform (linux/amd64/v3)
exec /bin/sh: exec format error
Root Cause
We removed use: buildx in #149 to fix the --load flag error, but buildx is actually required for cross-platform builds. Without buildx, Docker cannot build ARM64 images on AMD64 hosts.
The real issue in #149 was the --load flag, not buildx itself.
Solution
- Re-add
use: buildx
- Set up QEMU emulation in CI workflow for cross-platform builds
- Set up buildx properly before GoReleaser runs
- Ensure buildx doesn't try to use --load (it shouldn't for multi-platform)
Implementation
Step 1: Set up QEMU and buildx in workflow
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Step 2: Re-add buildx to .goreleaser.yaml
dockers:
- use: buildx
goarch: arm64
How It Works
- QEMU provides ARM64 emulation on AMD64 hosts
- Buildx uses QEMU to build ARM64 images
- GoReleaser pushes images directly (no --load)
- docker_manifests combines architectures
References
ARM64 Docker builds are failing because we're building on AMD64 hosts without proper cross-platform build support.
Error
Root Cause
We removed
use: buildxin #149 to fix the --load flag error, but buildx is actually required for cross-platform builds. Without buildx, Docker cannot build ARM64 images on AMD64 hosts.The real issue in #149 was the --load flag, not buildx itself.
Solution
use: buildxImplementation
Step 1: Set up QEMU and buildx in workflow
Step 2: Re-add buildx to .goreleaser.yaml
How It Works
References