pinebuds/Dockerfile

24 lines
999 B
Text
Raw Normal View History

2022-12-27 00:00:04 -06:00
FROM rust:1-slim-buster as programmer_build
2022-12-26 17:47:35 -06:00
LABEL maintainer="Ben V. Brown <ralim@ralimtek.com>"
WORKDIR /usr/src
2022-12-27 00:00:04 -06:00
RUN apt-get update && apt-get install -y git pkg-config libudev-dev bc
2022-12-26 17:47:35 -06:00
RUN git clone https://github.com/Ralim/bestool.git
RUN cd /usr/src/bestool/bestool/ && cargo build --release
2022-12-27 00:00:04 -06:00
FROM debian:buster
2022-09-25 02:55:03 -05:00
LABEL maintainer="Ben V. Brown <ralim@ralimtek.com>"
2022-12-26 17:47:35 -06:00
2022-12-27 05:45:11 -06:00
RUN apt update && apt-get install -y make git bash curl tar bzip2 bc
2022-12-27 00:00:04 -06:00
2022-09-25 02:55:03 -05:00
WORKDIR /src
# Git trust
RUN git config --global --add safe.directory /src
2022-12-27 05:45:11 -06:00
# Grab arm compiler; we have to use this ancient one or else we get boot failures. Probably subtle link issues.
2022-12-27 00:00:04 -06:00
RUN curl https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 | tar -xj
ENV PATH="${PATH}:/src/gcc-arm-none-eabi-9-2019-q4-major/bin"
WORKDIR /usr/src
COPY --from=programmer_build /usr/src/bestool/bestool/target/release/bestool /usr/local/bin/bestool
COPY . /usr/src