From b305c14fc1c0131f290627d65aa4f12260f82b2b Mon Sep 17 00:00:00 2001 From: Konstantin Zolotarev Date: Fri, 12 Apr 2024 11:35:16 +0200 Subject: [PATCH] Added comments into dockerfile --- Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 817df5d..9c2af90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,29 +1,28 @@ # syntax=docker/dockerfile:1.4 - FROM rust:alpine3.19 as build-environment ARG TARGETARCH WORKDIR /opt RUN apk add lld build-base linux-headers pkgconf openssl-dev -# RUN apk add clang lld curl build-base linux-headers git pkgconf openssl-dev \ -# && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh \ -# && chmod +x ./rustup.sh \ -# && ./rustup.sh -y RUN echo "export RUSTFLAGS='-Ctarget-feature=-crt-static'" >> $HOME/.profile +# Mac M1 workaround RUN [[ "$TARGETARCH" = "arm64" ]] && echo "export CFLAGS=-mno-outline-atomics" >> $HOME/.profile || true WORKDIR /opt/challenger COPY . . -RUN --mount=type=cache,target=/root/.cargo/registry --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/opt/challenger/target \ +RUN --mount=type=cache,target=/root/.cargo/registry \ + --mount=type=cache,target=/root/.cargo/git \ + --mount=type=cache,target=/opt/challenger/target \ source $HOME/.profile \ && cargo build --release \ && mkdir out \ && mv target/release/challenger out/challenger \ && strip out/challenger; +# Runner image FROM alpine:3.19 as challenger-client RUN apk add --no-cache linux-headers gcompat libgcc