Docker 映像的平台(linux/amd64)与检测主机平台(linux/arm64/v8)不匹配

 发生在mac电脑的docker环境上;

一、异常

yanzhen@yanzhendeMacBook-Pro test-js % docker run --name kubia-container -p 7979:8080 -d kubia -r linux-arm64
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
88c842dcbb5249485ddeb48ececb1c502aa0a4484ba4d4f401be48b0038a4

二、原因

 执行‘docker build -t kubia .’命令默认(linux/amd64)cpu;

三、结果

命令改为 : docker buildx build --platform linux/arm64 -t kubia .

[yanzhen@yanzhendeMacBook-Pro test-js % docker buildx build --platform linux/arm64 -t kubia .
[+] Building 1.1s (7/7) FINISHED                                                                                                                           
...

 

上一篇:Xcode-报错问题总结大全


下一篇:IDEA创建Gatling项目