无法为 iotedge 管道在 azure 上的 ARM64 上的模块构建映像

时间:2021-02-17 12:50:18

标签: azure-pipelines azure-iot-edge

我能够在 amd64 架构上为我的模块成功构建和部署映像。但是,在 yaml 文件中使用 defaultPlatform: arm64v8 的 arm64 架构构建失败。

失败并显示警告

---> [Warning] The requested image's platform (linux/arm64) does not match the detected host platform (linux/amd64) and no specific platform was requested

我假设构建发生在 amd 设备上,因此无法构建。有没有办法解决这个问题?

1 个答案:

答案 0 :(得分:0)

<块引用>

---> [警告] 请求的映像的平台 (linux/arm64) 与检测到的主机平台 (linux/amd64) 不匹配且未请求特定平台

根据错误消息,此问题与 Docker 版本 20.10.x 相关。

您可以运行命令并检查 docker 信息:docker info

请参考这张关于[v20.10] Platform architecture detection is broken的票。

这是 Docker 版本 20.10.x 中的一个已知问题。

您可以尝试以下解决方法:

  1. 将 docker 回滚到 19.x 版本

  2. --platform=linux/arm64/v8 添加到您的 Docker 构建参数。

很多用户在 Docker 20.10 版本中遇到过类似的问题,您可以关注上面的工单来检查更新。