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

2023. 8. 14. 00:47에러대응

도커 허브를 배포하는중에 발생했던 문제이다.

 

아래는 수행했던 명령어이다.

docker build -f Dockerfile -t <이름> . 
docker images
docker run -d -p 8080:8080 <이름>
docker ps 
docker stop [컨테이너_ID 또는 이름]
docker tag ticketnest:latest munyeolyoon/ticketnest:latest -> docker tag [이미지이름:태그 바꿀이름:태그]
docker push munyeolyoon/ticketnest -> docker push [계정명/레포티토리명]

EC2 에서 docker 수행

docker login
ID 입력
PW 입력

도커 허브 이미지 pull

sudo docker pull munyeolyoon/ticketnest:latest

이미지 띄우기

sudo docker run --name ticketnest -d -p 8080:8080 munyeolyoon/ticketnest

발생한 경고

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
c44f31b2972711d718024433ce9cd842c6d194fbe45167fd1733e1de25144802

무시하고 진행했으나 컨테이너가 실행되지 않았다.

 

로컬에서 도커허브로 이미지를 빌드할때 --platform linux/amd64 를 붙여주어야 한다고 한다.

 


SOLVE

 

docker build --platform linux/amd64  -f Dockerfile -t ticketnest .

 


참고 링크 

 

https://stackoverflow.com/questions/69054921/docker-on-mac-m1-gives-the-requested-images-platform-linux-amd64-does-not-m

 

Docker on Mac M1 gives: "The requested image's platform (linux/amd64) does not match the detected host platform"

I want to run a docker container for Ganache on my MacBook M1, but get the following error: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) a...

stackoverflow.com