diff --git a/Dockerfile b/Dockerfile index cc0f2bd..388c23e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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