|
1 | | -FROM debian:bullseye-slim AS base |
2 | | - |
3 | | -FROM base AS rust_build |
4 | | - |
5 | | -LABEL org.opencontainers.image.authors = "Ben V. Brown <[email protected]>, Dom Rodriguez <[email protected]>" |
6 | | - |
7 | | -WORKDIR /usr/src |
8 | | -ENV PATH="/root/.cargo/bin:$PATH" |
9 | | - |
10 | | -RUN apt-get update \ |
11 | | - && apt-get install -y \ |
12 | | - bc \ |
13 | | - build-essential \ |
14 | | - curl \ |
15 | | - git \ |
16 | | - libudev-dev \ |
17 | | - pkg-config \ |
18 | | - && curl https://sh.rustup.rs -sSf | bash -s -- -y \ |
19 | | - && git clone https://github.com/Ralim/bestool.git \ |
20 | | - && cd /usr/src/bestool/bestool/ \ |
21 | | - && cargo build --release |
22 | | - |
23 | | -FROM base as dev_env |
24 | | - |
25 | | -WORKDIR /usr/src |
26 | | - |
27 | | -RUN apt-get update \ |
28 | | - && apt-get install -y \ |
29 | | - bash \ |
30 | | - bc \ |
31 | | - bzip2 \ |
32 | | - curl \ |
33 | | - ffmpeg \ |
34 | | - clang-format \ |
35 | | - git \ |
36 | | - make \ |
37 | | - tar \ |
38 | | - xxd \ |
39 | | - && git config --global --add safe.directory /src \ |
40 | | - && mkdir -pv /src \ |
41 | | - && curl \ |
42 | | - 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/ |
43 | | - |
44 | | -RUN apt-get update \ |
45 | | - && apt-get install -y \ |
46 | | - minicom \ |
47 | | - sudo |
48 | | - |
49 | | -ENV PATH="${PATH}:/src/gcc-arm-none-eabi-9-2019-q4-major/bin" |
50 | | -COPY --from=rust_build /usr/src/bestool/bestool/target/release/bestool /usr/local/bin/bestool |
51 | | -COPY . /usr/src |
52 | | - |
53 | | -ENTRYPOINT ["/bin/bash"] |
| 1 | +FROM debian:bullseye-slim AS base |
| 2 | + |
| 3 | +FROM base AS rust_build |
| 4 | + |
| 5 | +LABEL org.opencontainers.image.authors = "Ben V. Brown <[email protected]>, Dom Rodriguez <[email protected]>" |
| 6 | + |
| 7 | +WORKDIR /usr/src |
| 8 | +ENV PATH="/root/.cargo/bin:$PATH" |
| 9 | + |
| 10 | +RUN apt-get update \ |
| 11 | + && apt-get install -y \ |
| 12 | + bc \ |
| 13 | + build-essential \ |
| 14 | + curl \ |
| 15 | + git \ |
| 16 | + libudev-dev \ |
| 17 | + pkg-config \ |
| 18 | + && curl https://sh.rustup.rs -sSf | bash -s -- -y \ |
| 19 | + && git clone https://github.com/Ralim/bestool.git \ |
| 20 | + && cd /usr/src/bestool/bestool/ \ |
| 21 | + && cargo build --release |
| 22 | + |
| 23 | +FROM base as dev_env |
| 24 | + |
| 25 | +WORKDIR /usr/src |
| 26 | + |
| 27 | +RUN apt-get update \ |
| 28 | + && apt-get install -y \ |
| 29 | + bash \ |
| 30 | + bc \ |
| 31 | + bzip2 \ |
| 32 | + clang-format \ |
| 33 | + cmake \ |
| 34 | + curl \ |
| 35 | + ffmpeg \ |
| 36 | + git \ |
| 37 | + make \ |
| 38 | + minicom \ |
| 39 | + sudo \ |
| 40 | + tar \ |
| 41 | + xxd \ |
| 42 | + && git config --global --add safe.directory /usr/src \ |
| 43 | + && mkdir -pv /usr/local/toolchains \ |
| 44 | + && curl \ |
| 45 | + 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 \ |
| 46 | + | tar -xj -C /usr/local/toolchains |
| 47 | + |
| 48 | +ENV PATH="${PATH}:/usr/local/toolchains/gcc-arm-none-eabi-9-2019-q4-major/bin" |
| 49 | +COPY --from=rust_build /usr/src/bestool/bestool/target/release/bestool /usr/local/bin/bestool |
| 50 | +COPY . /usr/src |
| 51 | + |
| 52 | +ENTRYPOINT ["/bin/bash"] |
0 commit comments