From c6b2530a0325360d60dbdf6e21dbbe374fc57e04 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Tue, 27 Dec 2022 17:00:04 +1100 Subject: [PATCH] Use matching compiler to their blobs --- Dockerfile | 18 +++++++++++------- docker-compose.yml | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 650d1e3..db28c84 100644 --- a/Dockerfile +++ b/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 " 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 " -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 diff --git a/docker-compose.yml b/docker-compose.yml index 166ec3e..05d42b3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,5 +8,5 @@ services: context: . command: /bin/bash volumes: - - ./:/src:Z + - ./:/usr/src:Z - /dev/:/dev/