[CRIU] [PATCH 1/4] Dockerfile.tmpl: merge apt-get lines

Kir Kolyshkin kir at openvz.org
Thu Nov 3 23:25:38 PDT 2016


As recommended by [1], "Always combine RUN apt-get update with apt-get
install in the same RUN statement". Also, ditch "apt-get clean", as it
seems to be useless.

[1] https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/

Cc: Andrei Vagin <avagin at virtuozzo.com>
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 scripts/build/Dockerfile.tmpl | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/scripts/build/Dockerfile.tmpl b/scripts/build/Dockerfile.tmpl
index 61c9afc..f1e7a50 100644
--- a/scripts/build/Dockerfile.tmpl
+++ b/scripts/build/Dockerfile.tmpl
@@ -1,10 +1,6 @@
 ARG CC=gcc
 
-RUN apt-get clean
-
-RUN apt-get update
-
-RUN apt-get install -y \
+RUN apt-get update && apt-get install -y \
                 build-essential \
                 protobuf-c-compiler \
                 libprotobuf-c0-dev \
-- 
2.7.4



More information about the CRIU mailing list