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
...
标签:amd64,平台,platform,arm64,linux,docker,kubia 来源: https://blog.csdn.net/u014259503/article/details/120782472