Can't build aarch64 image based on Ubuntu

$ docker build -t aarch64_builder aarch64_builder
[+] Building 1.0s (2/2) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 2.25kB 0.0s
=> ERROR [internal] load metadata for docker.io/arm64v8/ubuntu:20.04 0.9s

[internal] load metadata for docker.io/arm64v8/ubuntu:20.04:

$ docker pull arm64v8/ubuntu
Using default tag: latest
latest: Pulling from arm64v8/ubuntu
no matching manifest for linux/amd64 in the manifest list entries

This used to work, would be grateful for any advice

The pull command will always pull images for the cpu architecture of the system.

If you want to pull an image for a different architecture, you need to specify it:

docker pull --platform linux/arm64 arm64v8/ubuntu

The same is true for build.

1 Like

Thanks, that was indeed the problem. Not sure why it worked before but that might have been a year ago

It always required the --platform argument to pull/build images for other cpu architectures.

Either you worked on a system with an arm based cpu architecture, or the repository had multi-architecture tags supporting amd64 as well back then. While the later might not be impossible, it seems rather unlikely, as the repository is in the Docker Hub group arm64v8.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.