WARNING: The requested image‘s platform (linux/arm64/v8) does not match the detected host platform

学习使用docker时遇到的问题

问题复现:

1.在Mac系统中,构建了镜像

docker build -t image-name:tag .

2.发布到了docker hub中

docker tag local-image-name:tag docker-hub-username/repo-name:tag
docker push docker-hub-username/repo-name:tag

3.在docker playground中pull镜像

docker pull docker-hub-username/repo-name:tag
docker run docker-hub-username/repo-name:tag

4.运行警告⚠️

WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64/v3) and no specific platform was requested

解决方案

docker build --platform linux/amd64 -t image-name:tag .

你可能感兴趣的:(docker,linux,运维,docker,服务器)