Is it possible to use arm64 image for other targets using Docker BuildX?

55 Views Asked by At

I build my image for amd64 and arm64 platforms using BuildX. The problem is that when pulling them on a Raspberry Pi with a 32-bit userspace (and 64-bit kernel), I get:

docker: no matching manifest for linux/arm/v8 in the manifest list entries.

The obvious fix would be to include the arm platform in the build, but this creates an image that is 32-bit, which I dont want.

As the Pi OS has a 64-bit kernel, it can run 64-bit containers just fine, and I can even force it to do so on the commandline like this:

sudo docker run -it --platform linux/arm64 --security-opt seccomp:unconfined ....

Is there any way to instruct BuildX to also put the arm64 image under the arm name, so that a 64-bit image is always pulled even if Docker runs in 32-bit userspace?

I fully understand that this will not work for people pulling this image when using a 32-bit kernel, but I can live with that, as its more important for me that the majority with 64bit kernel can pull the right image.

0

There are 0 best solutions below