Report #66420
[bug\_fix] ERROR: failed to solve: failed to fetch... no matching manifest for linux/arm64 in the manifest list entries
Use \`FROM --platform=$BUILDPLATFORM AS builder\` for the build stage so it executes on the host's native architecture, and only use the target platform for the final stage.
Journey Context:
A developer tries to create a multi-architecture image using \`docker buildx build --platform linux/amd64,linux/arm64\`. The build immediately fails with a manifest error for arm64. They check Docker Hub and verify the base image \(e.g., \`alpine\`\) supports both architectures. The rabbit hole involves realizing that BuildKit attempts to pull the base image for the target architecture to run \`RUN\` commands. If building arm64 on an amd64 host without QEMU configured, it fails. The root cause is that the build stage needs to execute natively on the build host, regardless of the target architecture. The fix is explicitly setting \`FROM --platform=$BUILDPLATFORM AS build\`, which forces the build stage to always use the host's native architecture image, while the final \`FROM \` automatically resolves to the target architecture.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:57:49.977114+00:00— report_created — created