Hi guys !

I try to clean my Dockerfile.

The classic “Dockerfile” work fine and the Dockerfile.template also.

When I try something like Dockerfile.armv7hf or aarch64 I have an error on the balena bush that it can’t find my Dockerfile.

Any idea ?

what devices did you say were going to be in your APP ?

balena push can only push to the same type of devices that you have defined in your APP

maybe you have a mismatch


The application is set to “rpi” and I have a “Raspberry Pi 2” and a “Raspberry Pi 3”.

I try dockerfile like : Dockerfile.armv7hf or Dockerfile.raspberry-pi2 and Dockerfile.raspberrypi3 without success.

Dockerfile and Dockerfile.template work fine.

At this time I use the Dockerfile.template with the balenalib docker hub alpine image :

FROM balenalib/%%BALENA_ARCH%%-alpine:latest

Don’t know the difference between the official alpine image and the balena one


You can find more details about using multiple dockerfiles in our docs here, basically if the device-type of your application is raspberry-pi2 then Dockerfile.raspberry-pi2 will be selected, otherwise Dockerfile.armv7hf or Dockerfile.template or Dockerfile will be selected. In your case, the application is set to rpi then Dockerfile.rpi will be selected but you don’t have that file available so it didn’t work.

Regarding your second question, in the balenalib base images, we pre-installed some packages and tools so they will provide some extra features in comparison with official base images, more details can be found in our base images docs


I need to have a Dockerfile.rpi ? If I have rpi2, rpi3, rpi4 how to address different Dockerfile for those device ? It is what I try to do first : Dockerfile.armv7hf + Dockerfile.aarch64 and it doesn’t work

could you please send some extra information so that we can assist you better?

  1. You’ve mentioned that if you try to Balena push then you get an error. Could you please send us the error message and any related logs?
  2. Could you let us know more about the application those devices are connected, what kind of device type is this application targeted for?



Sorry, no time to test, I’m using the Dockerfile.template with balena apline image.

I’m working on a mopidy image with jellyfin client/server to add local music capabilities to my balena-sound.

I have have Raspberry Pi 2 / Raspberry Pi 3. the target will be Raspberry Pi 4 and Raspberry Pi 3 A+

I need to finish other stuff and I will try again the Dockerfile.armv7hf and Dockerfile.aarch64

Thank you

Hi there!
As mentioned above in your case, the application is set to rpi then Dockerfile.rpi will be selected but you don’t have that file available so it didn’t work. Make sure you create a new application type before you try again.
Please let us know when you test this and how it works for you.

Well what I was trying to do is to create a different docker file regarding my rpi2 / rpi3 / rpi4 on a same app. ( more related to the archetecture )

So I need to have a Dockerfile.rpi, Dockerfile.armv7hf and Dockerfile.aarch64 ?

Yes, here is an example with that:

You still need to make a separate balena application for RPi 2, RPi 3 and RPi 4, but at least you can use the same folder from which to push your sources to our builders.

hummm ok make sense !

thank you