From 899c6bfe7788623a54c1365401cb54f2e767f041 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 14 Dec 2015 10:45:47 -0800 Subject: [PATCH] Remove mention of "apt-get clean" as it's performed automatically Signed-off-by: Andrew "Tianon" Page Upstream-commit: 226329e54031256958740af0ae5bc1a4f2cd9c2e Component: engine --- components/engine/docs/articles/dockerfile_best-practices.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/engine/docs/articles/dockerfile_best-practices.md b/components/engine/docs/articles/dockerfile_best-practices.md index 3413aafb93..fad98f57f4 100644 --- a/components/engine/docs/articles/dockerfile_best-practices.md +++ b/components/engine/docs/articles/dockerfile_best-practices.md @@ -217,7 +217,6 @@ recommendations. ruby1.9.1 \ ruby1.9.1-dev \ s3cmd=1.1.* \ - && apt-get clean \ && rm -rf /var/lib/apt/lists/* The `s3cmd` instructions specifies a version `1.1.0*`. If the image previously @@ -230,6 +229,9 @@ keep the image size down. Since the `RUN` statement starts with `apt-get update`, the package cache will always be refreshed prior to `apt-get install`. +> **Note**: The official Debian and Ubuntu images [automatically run `apt-get clean`](https://github.com/docker/docker/blob/03e2923e42446dbb830c654d0eec323a0b4ef02a/contrib/mkimage/debootstrap#L82-L105), +> so explicit invocation is not required. + ### CMD [Dockerfile reference for the CMD instruction](../reference/builder.md#cmd)