Instead of hardcoding the version of the Rust alpine file, introduce an
`ARG` in
the `Dockerfile`. In `build/build`, we determine the version by
inspecting
`rust-toolchain.toml`, and pass this value in. This ensures that the
binaries
are built using the same toolchain that we develop with.
Co-authored-by: Fintan Halpenny <fintan.halpenny@gmail.com>
Usually going with Darwin -> aarch64 and the rest fallback to amd64
isn't a bad choice, but I think we can do better by checking `arch` so a
device like a Raspberry which has an ARM CPU is able to run the build
script.
`--env` is a podman-specific feature. While it is clear that podman is a requirement here, switching these to build arguments better expresses intent.
These values are meant to be configurable at build time, which is exactly what build arguments are for, while environment variables are meant to persist in the image built.
Additionally, this removes unused env vars.
Signed-off-by: Yorgos Saslis <yorgos.work@proton.me>