Skip to content

Commit

Permalink
Docker cache for speedier local builds
Browse files Browse the repository at this point in the history
  • Loading branch information
nain-F49FF806 committed Mar 13, 2024
1 parent 991ae34 commit 9f6bc08
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
FROM rust:latest as builder

# Required for building starship
RUN apt update && apt install -y cmake
RUN --mount=type=cache,target=/var/cache/apt \
apt update && apt install -y cmake

COPY useful-crates /useful-crates
RUN cargo install --locked $(cat useful-crates)
RUN \
--mount=type=cache,target=${CARGO_HOME}/git \
--mount=type=cache,target=${CARGO_HOME}/registry \
cargo install --locked $(cat useful-crates)
RUN rm /useful-crates


Expand Down

0 comments on commit 9f6bc08

Please sign in to comment.