cargo-deb-crossbuild/Dockerfile.arm64

19 lines
698 B
Docker

FROM docker.io/rust:bookworm
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y g++-arm-linux-gnueabihf libc6-dev-armhf-cross libclang-dev
# Uncomment if you need to add more build dependencies to the image:
# RUN apt-get install -y <build-depend..>
RUN rustup target add armv7-unknown-linux-gnueabihf
RUN rustup toolchain install stable-armv7-unknown-linux-gnueabihf
RUN cargo install cargo-deb
WORKDIR /app
ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
CC_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc \
CXX_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-g++
CMD ["cargo", "deb", "--target", "armv7-unknown-linux-gnueabihf"]