pinebuds/Dockerfile

49 lines
1.2 KiB
Text
Raw Permalink Normal View History

FROM debian:bullseye-slim AS base
FROM base AS rust_build
LABEL org.opencontainers.image.authors = "Ben V. Brown <ralim@ralimtek.com>, Dom Rodriguez <shymega@shymega.org.uk>"
2022-12-26 17:47:35 -06:00
WORKDIR /usr/src
ENV PATH="/root/.cargo/bin:$PATH"
2022-12-26 17:47:35 -06:00
RUN apt-get update \
&& apt-get install -y \
2023-01-31 04:18:56 -06:00
bc \
build-essential \
curl \
git \
libudev-dev \
pkg-config \
&& curl https://sh.rustup.rs -sSf | bash -s -- -y \
&& git clone https://github.com/Ralim/bestool.git \
&& cd /usr/src/bestool/bestool/ \
&& cargo build --release
2022-09-25 02:55:03 -05:00
FROM base as dev_env
2022-12-26 17:47:35 -06:00
WORKDIR /usr/src
2022-12-27 00:00:04 -06:00
RUN apt-get update \
&& apt-get install -y \
2023-01-31 04:18:56 -06:00
bash \
bc \
bzip2 \
curl \
ffmpeg \
2023-02-01 14:52:23 -06:00
clang-format \
2023-01-31 04:18:56 -06:00
git \
make \
tar \
xxd \
&& git config --global --add safe.directory /src \
&& mkdir -pv /src \
&& curl \
2023-01-31 04:18:56 -06:00
https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-$(arch)-linux.tar.bz2 | tar -xj -C /src/
2022-12-27 05:45:11 -06:00
2022-12-27 00:00:04 -06:00
ENV PATH="${PATH}:/src/gcc-arm-none-eabi-9-2019-q4-major/bin"
COPY --from=rust_build /usr/src/bestool/bestool/target/release/bestool /usr/local/bin/bestool
2022-12-27 00:00:04 -06:00
COPY . /usr/src
ENTRYPOINT ["/bin/bash"]