diff --git a/Dockerfile b/Dockerfile index 13118f7..3b473b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,8 +12,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ pkg-config \ && rm -rf /var/lib/apt/lists/* -# 1. Copy manifests to cache dependencies -COPY Cargo.toml Cargo.lock ./ +# 1. Copy manifests and toolchain pin to cache dependencies with the same compiler +COPY Cargo.toml Cargo.lock rust-toolchain.toml ./ # Create dummy targets declared in Cargo.toml so manifest parsing succeeds. RUN mkdir -p src benches \ && echo "fn main() {}" > src/main.rs \