From 99d42f9353549ad00f0bb5bd545ec00f46d12990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Drouet?= Date: Wed, 1 Apr 2020 18:49:17 +0200 Subject: [PATCH] Clean dockerfile layer in Rust example Following the [best practices](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/) we should encourage people to remove the cache after installing dependencies. --- rust/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/content.md b/rust/content.md index 56bbd2fa3..ce3595d6b 100644 --- a/rust/content.md +++ b/rust/content.md @@ -39,7 +39,7 @@ COPY . . RUN cargo install --path . FROM debian:buster-slim -RUN apt-get update && apt-get install -y extra-runtime-dependencies +RUN apt-get update && apt-get install -y extra-runtime-dependencies && rm -rf /var/lib/apt/lists/* COPY --from=builder /usr/local/cargo/bin/myapp /usr/local/bin/myapp CMD ["myapp"] ```