Add dockerfile for easier building on MacOS

This commit is contained in:
Markus Unterwaditzer
2025-04-10 10:12:19 +02:00
committed by Cooper Quintin
parent 30e543898b
commit e440dab736
2 changed files with 22 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
FROM rust:1.86-bullseye
RUN apt-get update
RUN apt-get install -y build-essential libc6-armhf-cross libc6-dev-armhf-cross gcc-arm-linux-gnueabihf
RUN rustup target add armv7-unknown-linux-gnueabihf
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
# Tool to cross-compile outside of Linux.
#
# On MacOS, OrbStack is recommended, but other docker distributions will work
# too.
#
# Usage:
# ./tools/run-docker-devenv
#
# Inside the shell:
# cargo build --bin rayhunter-daemon --target armv7-unknown-linux-gnueabihf --release
#
# Your output binary is in ./target/armv7-unknown-linux-gnueabihf/release/rayhunter-daemon
docker build -t rayhunter-devenv -f tools/devenv.dockerfile .
exec docker run --user $UID:$GID -v ./:/workdir -w /workdir -it rayhunter-devenv "$@"