cargo-chef
cargo-chef copied to clipboard
Caching doesn't work when `strip = "debuginfo"` is set
Quick reproducer
cargo new foo
cd foo
cargo add rand # Example dependency
echo '
[profile.release]
strip = "debuginfo"' >>Cargo.toml
echo 'FROM clux/muslrust:1.63.0 AS chef
RUN cargo install cargo-chef --locked
WORKDIR /usr/src/foo
FROM chef AS planner
COPY . .
RUN cargo chef prepare
FROM chef AS builder
COPY --from=planner /usr/src/foo/recipe.json recipe.json
RUN cargo chef cook --release
COPY . .
RUN cargo build --release
' | docker build -f- .
(See that rand is built twice in the output)