PLATFORM_NOT_SUPPORTED
cicd
build_error
ai_generated
true
构建失败:构建器实例不支持平台'linux/arm64/v8'
ERROR: failed to solve: platform 'linux/arm64/v8' not supported by the builder instance
ID: cicd/docker-buildx-platform-not-supported
83%修复率
89%置信度
1证据数
2024-05-22首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| Docker 24.0 | active | — | — | — |
| Buildx 0.12 | active | — | — | — |
| QEMU 7.2 | active | — | — | — |
| Linux x86_64 host | active | — | — | — |
根因分析
Docker Buildx构建器没有启用请求的平台(例如ARM64),或未安装用于跨平台构建的QEMU仿真。
English
Docker Buildx builder does not have the requested platform (e.g., ARM64) enabled or the QEMU emulation is not installed for cross-platform builds.
官方文档
https://docs.docker.com/build/building/multi-platform/解决方案
-
Install QEMU binfmt support: `docker run --privileged --rm tonistiigi/binfmt --install all`, then create builder: `docker buildx create --name multiarch --driver docker-container --bootstrap`
-
Use existing multiarch builder: `docker buildx use multiarch && docker buildx inspect --bootstrap` to verify platforms
-
In CI, add step to setup QEMU: `uses: docker/setup-qemu-action@v3` and `uses: docker/setup-buildx-action@v3` before build
无效尝试
常见但无效的做法:
-
75% 失败
Default driver doesn't support multi-platform builds at all; fails with different error.
-
40% 失败
Avoids the error but defeats the purpose of multi-platform builds; doesn't fix builder configuration.
-
55% 失败
Default builder may not include QEMU or ARM emulation; need explicit --driver-opt.