Expected behavior
docker pull --platform=linux/arm64 ... pulls image for linux/arm64 platform, or fails with an error if it is not available
Actual behavior
Docker appears to fall back to linux/amd64 which was extremely surprising behaviour
Information
- macOS Version: 11.2.3
- Intel chip or Apple chip: Apple M1 (Macbook Pro)
- Docker Desktop Version: 3.3.1 (63152)
Also reproduced with 3.3.0 and 3.3.1 on an M1 Mac Mini
Steps to reproduce the behavior
### make sure no images are lying around to confuse things
$ docker system prune -a
WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all images without at least one container associated to them
- all build cache
Are you sure you want to continue? [y/N] y
Total reclaimed space: 0B
### no images present
$ docker images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
### try to pull an arm64 Terraform image --- which doesn't exist, but linux/amd64 does
$ docker pull --platform=linux/arm64 hashicorp/terraform:0.12.30
0.12.30: Pulling from hashicorp/terraform
801bfaa63ef2: Pull complete
99202a18a200: Pull complete
f982975ff37a: Pull complete
Digest: sha256:e47cb5dff9984c39affb320610879b817f98fa89835178cf05707d9f299ce4cc
Status: Downloaded newer image for hashicorp/terraform:0.12.30
docker.io/hashicorp/terraform:0.12.30
$ docker images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
hashicorp/terraform 0.12.30 70de4cb15e1d 3 months ago 98.1MB
$ docker inspect 70de4cb15e1d | jq .[].Architecture
"amd64"
Expected behavior
docker pull --platform=linux/arm64 ...pulls image forlinux/arm64platform, or fails with an error if it is not availableActual behavior
Docker appears to fall back to
linux/amd64which was extremely surprising behaviourInformation
Also reproduced with 3.3.0 and 3.3.1 on an M1 Mac Mini
Steps to reproduce the behavior