Use matching compiler to their blobs
This commit is contained in:
parent
f2b701ef76
commit
c6b2530a03
2 changed files with 12 additions and 8 deletions
18
Dockerfile
18
Dockerfile
|
@ -1,18 +1,22 @@
|
|||
FROM rust:1-alpine3.16 as programmer_build
|
||||
FROM rust:1-slim-buster as programmer_build
|
||||
LABEL maintainer="Ben V. Brown <ralim@ralimtek.com>"
|
||||
WORKDIR /usr/src
|
||||
RUN apk add --no-cache git musl-dev
|
||||
RUN apt-get update && apt-get install -y git pkg-config libudev-dev bc
|
||||
RUN git clone https://github.com/Ralim/bestool.git
|
||||
RUN cd /usr/src/bestool/bestool/ && cargo build --release
|
||||
|
||||
FROM alpine:3.16
|
||||
FROM debian:buster
|
||||
LABEL maintainer="Ben V. Brown <ralim@ralimtek.com>"
|
||||
|
||||
COPY --from=programmer_build /usr/src/bestool/bestool/target/release/bestool /usr/local/bin/bestool
|
||||
|
||||
RUN apk add --no-cache gcc-arm-none-eabi newlib-arm-none-eabi make git bash
|
||||
RUN apt update && apt-get install -y make git bash curl tar bzip2
|
||||
|
||||
WORKDIR /src
|
||||
# Git trust
|
||||
RUN git config --global --add safe.directory /src
|
||||
|
||||
COPY . /src
|
||||
# Grab arm compiler
|
||||
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
|
||||
|
|
|
@ -8,5 +8,5 @@ services:
|
|||
context: .
|
||||
command: /bin/bash
|
||||
volumes:
|
||||
- ./:/src:Z
|
||||
- ./:/usr/src:Z
|
||||
- /dev/:/dev/
|
||||
|
|
Loading…
Reference in a new issue