Skip to content

Commit

Permalink
improve cargo build performance by using spare protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
omer9564 committed Jun 28, 2023
1 parent ad15e64 commit b900502
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ COPY src src
COPY Cargo.toml Cargo.toml
COPY Cargo.lock Cargo.lock

# To improve performance and prevent the entire registry from being downloaded
# see https://blog.rust-lang.org/inside-rust/2023/01/30/cargo-sparse-protocol.html
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

RUN cargo build ${CARGO_FLAGS}

FROM debian:bullseye-slim as agent
Expand Down

0 comments on commit b900502

Please # to comment.