Skip to content

Commit

Permalink
chore: update Dockerfile to clean up apt-get cache
Browse files Browse the repository at this point in the history
This commit updates the Dockerfile to clean up the apt-get cache after installing clang and llvm. This helps reduce the size of the Docker image.
  • Loading branch information
Extheoisah committed Jan 25, 2024
1 parent bbb168d commit bbda19f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ ENV TARGET_RUST_ARCH="x86_64-unknown-linux-musl"

FROM base as builder-arm64
ENV TARGET_RUST_ARCH="aarch64-unknown-linux-musl"
RUN apt-get update && apt-get install clang llvm -y --no-install-recommends
RUN apt-get update \
&& apt-get install clang llvm -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV CC_aarch64_unknown_linux_musl=clang
ENV AR_aarch64_unknown_linux_musl=llvm-ar
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-Clink-self-contained=yes -Clinker=rust-lld"
Expand Down

0 comments on commit bbda19f

Please sign in to comment.