[CRIU] [PATCH 2/5] scripts/build/Dockerfiles: nitpicks

Kir Kolyshkin kolyshkin at gmail.com
Fri Mar 16 00:09:38 MSK 2018


1. Sort lists of packages to be installed, unify indentation.

2. Merge "ccache -s" and "ccache -z".

Signed-off-by: Kir Kolyshkin <kolyshkin at gmail.com>
---
 scripts/build/Dockerfile.alpine      | 45 ++++++++++++++++++------------------
 scripts/build/Dockerfile.fedora.tmpl | 26 +++++++++++++++++----
 scripts/build/Dockerfile.tmpl        | 36 ++++++++++++++---------------
 3 files changed, 63 insertions(+), 44 deletions(-)

diff --git a/scripts/build/Dockerfile.alpine b/scripts/build/Dockerfile.alpine
index 01a3aa3d..eb33a9ce 100644
--- a/scripts/build/Dockerfile.alpine
+++ b/scripts/build/Dockerfile.alpine
@@ -3,35 +3,36 @@ ARG CC=gcc
 ARG ENV1=FOOBAR
 
 RUN apk update && apk add \
-                build-base \
-                coreutils \
-                git \
-                protobuf-c-dev \
-                protobuf-dev \
-                python \
-                libaio-dev \
-                libcap-dev \
-                libnl3-dev \
-                pkgconfig \
-                libnet-dev \
-                ccache \
-                $CC
+	$CC \
+	build-base \
+	ccache \
+	coreutils \
+	git \
+	libaio-dev \
+	libcap-dev \
+	libnet-dev \
+	libnl3-dev \
+	pkgconfig \
+	protobuf-c-dev \
+	protobuf-dev \
+	python
 
 COPY . /criu
 WORKDIR /criu
 ENV CC="ccache $CC" CCACHE_DIR=/tmp/.ccache CCACHE_NOCOMPRESS=1 $ENV1=yes
-RUN mv .ccache /tmp && make mrproper && ccache -s && ccache -z &&\
+RUN mv .ccache /tmp && make mrproper && ccache -sz && \
 	date && make -j $(nproc) CC="$CC" && date && ccache -s
 
 # Run a test
-RUN apk add	py-yaml \
-		py-pip	\
-		ip6tables \
-		iptables \
-		iproute2 \
-		tar \
-		bash\
-		go
+RUN apk add \
+	py-yaml \
+	py-pip	\
+	ip6tables \
+	iptables \
+	iproute2 \
+	tar \
+	bash \
+	go
 
 RUN pip install protobuf ipaddr
 RUN make -C test/zdtm
diff --git a/scripts/build/Dockerfile.fedora.tmpl b/scripts/build/Dockerfile.fedora.tmpl
index 09787e42..618efddf 100644
--- a/scripts/build/Dockerfile.fedora.tmpl
+++ b/scripts/build/Dockerfile.fedora.tmpl
@@ -1,14 +1,32 @@
 ARG CC=gcc
 ARG ENV1=FOOBAR
 
-RUN dnf install -y git gcc make
-RUN dnf install -y protobuf-devel protobuf-c-devel libaio-devel libcap-devel libnl3-devel libnet-devel
-RUN dnf install -y python ccache libasan findutils tar python-yaml protobuf-python iptables iproute python-ipaddr procps-ng
+RUN dnf install -y \
+	ccache \
+	findutils \
+	gcc \
+	git \
+	iproute \
+	iptables \
+	libaio-devel \
+	libasan \
+	libcap-devel \
+	libnet-devel \
+	libnl3-devel \
+	make \
+	procps-ng \
+	protobuf-c-devel \
+	protobuf-devel \
+	protobuf-python \
+	python \
+	python-ipaddr \
+	python-yaml \
+	tar
 
 COPY . /criu
 WORKDIR /criu
 
 ENV CCACHE_DIR=/tmp/.ccache CCACHE_NOCOMPRESS=1 $ENV1=yes
-RUN mv .ccache /tmp && make mrproper && ccache -s && ccache -z && \
+RUN mv .ccache /tmp && make mrproper && ccache -sz  && \
 	date && make -j $(nproc) CC="$CC" && date && ccache -s
 RUN make -C test/zdtm -j $(nproc)
diff --git a/scripts/build/Dockerfile.tmpl b/scripts/build/Dockerfile.tmpl
index c562af32..f1fff3a5 100644
--- a/scripts/build/Dockerfile.tmpl
+++ b/scripts/build/Dockerfile.tmpl
@@ -2,24 +2,24 @@ ARG CC=gcc
 ARG ENV1=FOOBAR
 
 RUN apt-get update && apt-get install -y \
-                build-essential \
-                protobuf-c-compiler \
-                libprotobuf-c0-dev \
-                libprotobuf-dev \
-                bsdmainutils \
-                protobuf-compiler \
-                python-minimal \
-                libaio-dev \
-                libcap-dev \
-                iptables \
-                libnl-3-dev \
-		libnl-route-3-dev \
-                libselinux-dev \
-                pkg-config \
-                git-core \
-		libnet-dev \
-		ccache \
-                $CC
+	ccache \
+	libnet-dev \
+	libnl-route-3-dev \
+	$CC \
+	bsdmainutils \
+	build-essential \
+	git-core \
+	iptables \
+	libaio-dev \
+	libcap-dev \
+	libnl-3-dev \
+	libprotobuf-c0-dev \
+	libprotobuf-dev \
+	libselinux-dev \
+	pkg-config \
+	protobuf-c-compiler \
+	protobuf-compiler \
+	python-minimal
 
 COPY . /criu
 WORKDIR /criu
-- 
2.14.1



More information about the CRIU mailing list