From 8c67d52f3a0e158fd9340979b0314dedbe7c319e Mon Sep 17 00:00:00 2001 From: Azhar Desai <1556970+azh-r@users.noreply.github.com> Date: Tue, 27 Jan 2026 18:19:15 +0200 Subject: [PATCH] Fix mismatch between builder and runtime images The `cargo-chef:latest-rust-1` has been updated since this doc was originally written and now compiles the Rust program with a later version of libc, than is used in the runtime images. Without a fix like this, programs will fail to build with an error like: ```/usr/local/bin/myapp: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /usr/local/bin/myapp)``` --- rust/the-basics/cargo-chef.html.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/the-basics/cargo-chef.html.md b/rust/the-basics/cargo-chef.html.md index 981d8479d1..81cac7765d 100644 --- a/rust/the-basics/cargo-chef.html.md +++ b/rust/the-basics/cargo-chef.html.md @@ -26,7 +26,7 @@ COPY . . RUN cargo build --release --bin [rust-app] # We do not need the Rust toolchain to run the binary! -FROM debian:bookworm-slim AS runtime +FROM debian:trixie-slim AS runtime WORKDIR /app COPY --from=builder /app/target/release/[rust-app] /usr/local/bin ENTRYPOINT ["/usr/local/bin/[rust-app]"]