-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Dockerfile
36 lines (25 loc) · 1.02 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM debian:bookworm@sha256:e97ee92bf1e11a2de654e9f3da827d8dce32b54e0490ac83bfc65c8706568116
ARG PI_TOOLS_GIT_REF=master
ARG RUST_VERSION=stable
# update system
RUN apt-get update && \
apt-get install -y curl git gcc xz-utils sudo pkg-config unzip
# config and set variables
#
COPY build /tmp/build
RUN sh /tmp/build/user-setup.sh
USER cross
ENV HOME=/home/cross
ENV URL_GIT_PI_TOOLS=https://github.com/raspberrypi/tools.git \
TOOLCHAIN_64=$HOME/pi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin \
TOOLCHAIN_32=$HOME/pi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
# install rustup with raspberry target
RUN sh /tmp/build/download-rust.sh
COPY bin/gcc-sysroot $HOME/pi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/gcc-sysroot
COPY bin/gcc-sysroot $HOME/pi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/gcc-sysroot
# configure cargo
COPY conf/cargo-config $HOME/.cargo/config
COPY bin $HOME/bin
ENV PATH=$HOME/bin:$PATH
ENTRYPOINT ["run.sh"]
CMD ["help"]