Skip to content

Commit

Permalink
Improve Docker layer caching (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom authored Oct 31, 2023
1 parent e85cf00 commit c09a6eb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ FROM rust:1.71-slim as base

WORKDIR /analyzer

COPY . .

RUN apt-get update && \
apt-get install -y musl musl-dev musl-tools && \
rustup target add x86_64-unknown-linux-musl && \
cargo build --release --target=x86_64-unknown-linux-musl && \
rustup target add x86_64-unknown-linux-musl

COPY . .

RUN cargo build --release --target=x86_64-unknown-linux-musl && \
cp target/x86_64-unknown-linux-musl/release/rust-analyzer ./bin/

FROM alpine:latest
Expand Down

0 comments on commit c09a6eb

Please sign in to comment.