I have a Dockerfile that pulls FROM hivemq/hivemq-ce
. This works well on "standard" platforms but not on the Raspberry Pi. So I built the image for arm64 myself directly on the RasPi following the tutorial in the official HiveMQ repo and pushed it to my private docker registry. The Dockerfile works well on RasPi if I change the FROM
line to FROM my-private-registry/hivemq-ce
.
So now I have images that work on different platforms in different sources. But how can I make my Dockerfile work on all platforms? Is there any way to pull from different sources for different architectures?
As outlined here docker supports multiple cpu architectures and will select the correct image for the correct platform. So you could build a non arm64 image for
frederikheld/hivemq-ce
and push it to the same location without affecting the arm64 image.You should be able to run
docker manifest inspect frederikheld/hivemq-ce
to see the available architectures for a given image.