21 lines
733 B
Docker
21 lines
733 B
Docker
FROM docker.io/rust:bullseye
|
|
|
|
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
|
|
|
RUN apt-get update && apt-get upgrade -y
|
|
RUN apt-get install -y g++-arm-linux-gnueabihf libc6-dev-armhf-cross
|
|
# 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"]
|