# Recommended procedure for cross-platform setup with non-balena base images

**URL:** <https://forums.balena.io/t/recommended-procedure-for-cross-platform-setup-with-non-balena-base-images/46290>\
**Category:** balenaOS\
**Created:** [November 24, 2019, 9:55pm UTC](https://forums.balena.io/t/recommended-procedure-for-cross-platform-setup-with-non-balena-base-images/46290 "2019-11-24T21:55:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bvetter](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@bvetter](https://forums.balena.io/u/bvetter)\
**Post date:** [November 24, 2019, 9:55pm UTC](https://forums.balena.io/t/recommended-procedure-for-cross-platform-setup-with-non-balena-base-images/46290/1 "2019-11-24T21:55:08Z")

</div>

Hi there,

I have successfully set up a multi container project where containers communicate via AMQP messaging. To achieve this, im am currently using a broker via the official arm32v7/rabbitmq image. This image is part of my docker-compose setup. Now I want to leverage the Dockerfile.template mechanism to make my project architecture independent. The application containers are based on balenalib base images, so I can use placeholders for the target platform (‘raspberrypi3’, for example) - everything fine so far.

But how do I proceed with the rabbitmq image? It is not part of balenalib and does not conform to the device type and architecture naming standards from balena. I would need to distinguish between arm32v7/rabbitmq and amd64/rabbitmq, for example.

Solutions I have in mind:

1. Push the official images into my private registry and rename them to sth. like raspberrypi3-rabbitmq, armv7h-rabbitmq, or amd64-rabbitmq etc.
2. Create a rabbitmq image from an balenalib/alpine base image and build rabbitmq on top.
3. Create two or more architecture specific project referring to the official rabbitmq images.

Any suggestions for an elegant solution are welcome.

Kind regards  
Bruno

---

<div class="post-metadata">

**Author:** ![afitzek](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/afitzek/32/359_2.png) [@afitzek](https://forums.balena.io/u/afitzek)\
**Post date:** [November 25, 2019, 8:50am UTC](https://forums.balena.io/t/recommended-procedure-for-cross-platform-setup-with-non-balena-base-images/46290/2 "2019-11-25T08:50:49Z")

</div>

Hi,  
You could also use the `Dockerfile.<devicetype | arch>` mechanism ([https://www.balena.io/docs/learn/deploy/deployment/#project-resolutions](https://www.balena.io/docs/learn/deploy/deployment/#project-resolutions)). So you could use the architecture specific rabbitmq image.

For example you could have a `rabbitmq` folder, with a  
`Dockerfile.amd64` with the content:

```auto
FROM amd64/rabbitmq

```

and

`Dockerfile.armv7hf` with the conent:

```auto
FROM armv7hf/rabbitmq

```

This is a list of our supported device types with the matching architecture.

I hope I understood the problem and this is a viable solution.

Best regards,

---

<div class="post-metadata">

**Author:** ![bvetter](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@bvetter](https://forums.balena.io/u/bvetter)\
**Post date:** [November 25, 2019, 9:42am UTC](https://forums.balena.io/t/recommended-procedure-for-cross-platform-setup-with-non-balena-base-images/46290/4 "2019-11-25T09:42:19Z")

</div>

Yes! I had not seen this mechanism.

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![bvetter](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@bvetter](https://forums.balena.io/u/bvetter)\
**Post date:** [November 25, 2019, 10:17am UTC](https://forums.balena.io/t/recommended-procedure-for-cross-platform-setup-with-non-balena-base-images/46290/5 "2019-11-25T10:17:09Z")

</div>

Well…  
It seems I am missing something. I set up Dockerfile.amd64 and Dockerfile.armv7hf in my rabbitmq/ subfolder, but if I balena push, balena picks up the amd64 Dockerfile although my project is raspberry3 based.

Any idea?

Edit: please ignore my reply, I had a typo in my Dockerfiles. It seems to work now. Thanks!

---

<div class="post-metadata">

**Author:** ![gelbal](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/gelbal/32/1109_2.png) [@gelbal](https://forums.balena.io/u/gelbal)\
**Post date:** [November 25, 2019, 11:09am UTC](https://forums.balena.io/t/recommended-procedure-for-cross-platform-setup-with-non-balena-base-images/46290/6 "2019-11-25T11:09:00Z")

</div>

Good to hear that it works @bvetter : )
