I noticed label warning label with amd64
in container's list of Docker for Mac. I built images with buildx for linux/amd64
, linux/arm64
and pushed to nexus. I updated one of services in docker-compose.yml with property platform: "linux/arm64"
. Unfortunately, I received error:
Error response from daemon: image with reference nexus.xxx.xxx was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64
I am supprized because I have mac with M1 Max and also docker info
prints out Architecture: aarch64
I tried to type:
export DOCKER_DEFAULT_PLATFORM=linux/arm64
and also I put this to .zshrc
but it doesn't works (even after reboot).
How can I run arm64 images on Apple chip?
Enviroment
Docker: v20.10.17 build 100c701
Docker Compose: v2.6.1
Docker Desktop: v4.10.1 (82475)
MacOS: 12.4
CodePudding user response:
It looks like you are getting a wrong image. Are you sure there are both versions in the registry? Try to run container after pulling the image with platform information:
docker pull --platform linux/arm64 your_image