From b21fda47fd9ca809844084078f0d2ea81dfd2af8 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 15 Mar 2018 14:09:38 -0700 Subject: [PATCH] scripts/build/Dockerfiles: nitpicks 1. Sort lists of packages to be installed, unify indentation. 2. Merge "ccache -s" and "ccache -z". Signed-off-by: Kir Kolyshkin --- 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 01a3aa3d7..eb33a9ce8 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 09787e42c..618efddfb 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 c562af329..f1fff3a52 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