Balena Deploy specify architecture


Using buildx I build and push both x86 and arm images to docker hub. My docker-compose file pulls these images directly from docker hub. When I deploy an application using openBalena it automatically pulls the one for my host os (x86) when I want it to pull the arm based one for my devices. Is there a way to set that up? Is there an option I am missing?

Hey there @mchonaker are you pushing these images as a single tag containing multiple architectures, or are you tagging them separately? I think the short of it is that you’ll need to specify in the docker-compose precisely which image to pull; I know that our balenaCloud builders can now pull based on architecture but I’m not sure if that’s possible with openBalena yet.

If the images for both architectures are under the same tag you can use the digest from Dockerhub to specify exactly which one to pull, then specify it within docker-compose like: image: influxdb@sha256:73f876e0c3bd02900f829d4884f53fdfffd7098dd572406ba549eed955bf821f.

I hope this helps but let us know if not!

are you pushing those images as a multi-arch image or as images with different labels/image names?
The openBalena builder should use the application’s architecture to decide what to pull when you have a multi-arch image as a base image.
You could also try using template files with the architecture in the image reference to be on the safe side.

I am deploying them as multi-arch images. I am currently just using balena deploy App and it says that its pulling based on my computer architecture. I will try to use the platform option in the docker compose file. I am also going to try to deploy my app from an arm based computer. @Hades32 what do you mean by openBalena builder? Is that using balena build?

Also I realized that I accidentally cross posted this issue. (I thought it didn’t submit when it actually did.) How to specify architecture in Balena Deploy - #6 by klutchell. Is there a way to delete an issue?