M1 Docker build error
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
M1 is an arm64/v8 architecture, so that Docker will build an image with arm64/v8 architecture. In order to use Docker image in AWS EC2, which generally uses amazonlinux OS and its architecture is linux/amd64, docker image should be a linux/amd64 architecture. So when you build, you can designate image’s platform to be based as linux/amd64.
docker build --no-cache --platform=linux/amd64 -t [TAG_NAME].