balena-io-examples / balena-rust-hello-world

Example of how to deploy Rust code on a balena supported device.
https://www.balena.io/docs/learn/getting-started/raspberrypi3/rust/
Apache License 2.0
20 stars 8 forks source link

use arch specific dockerfiles to allow building on all architectures #10

Closed shaunmulligan closed 5 years ago

shaunmulligan commented 6 years ago

Currently the project is ARMv7 specific which is problematic as it wont work for people getting started on x86 or armv6 device types.

To make this work we should add dockerfiles with specific architectures for example the repo should have the following in its root:

With this, any time the code is pushed to a RPI Zero or v1, it will build the Dockerfile.rpi and in this way we can have armv6l specific code in that dockerfile. Similarly for the armv7l case.

For any other architecture we can just have the Dockerfile.template as a catch all.