From 194316eab73611f98b5cb86209e6eb1a90f0ba37 Mon Sep 17 00:00:00 2001 From: Mark Hansen Date: Sun, 17 May 2020 13:15:17 +1000 Subject: [PATCH] Squash Centos Dockerfiles yums into fewer layers This should speed up builds, giving yum some more opportunity for parallelism, and should decrease the Docker image size because the files that are 'cleaned up' at the end are no longer in any of the Docker filesystem layers. --- ci/centos6/Dockerfile | 104 +++++++++++++++--------------------------- ci/centos7/Dockerfile | 99 ++++++++++++++-------------------------- ci/centos8/Dockerfile | 95 ++++++++++++++------------------------ 3 files changed, 105 insertions(+), 193 deletions(-) diff --git a/ci/centos6/Dockerfile b/ci/centos6/Dockerfile index 4ad801661..a21abcc32 100644 --- a/ci/centos6/Dockerfile +++ b/ci/centos6/Dockerfile @@ -5,101 +5,71 @@ RUN yum -y groupinstall 'Development Tools' RUN ln -s /usr/lib64/libedit.so.0 /usr/lib64/libedit.so # Centos build utilities -RUN yum -y install libtool-ltdl-devel -RUN yum -y install ksh -RUN yum -y install cmake - +RUN yum -y install \ +libtool-ltdl-devel \ +ksh \ +cmake \ # Option xpat -RUN yum -y install expat-devel - +expat-devel \ # Option glut -RUN yum -y install freeglut-devel - +freeglut-devel \ # Option gts - # Option swig -RUN yum -y install swig - +swig \ # Command lefty - # Command smyra - # Command gvedit -RUN rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm -RUN yum -y install qt5-qtbase-devel -RUN yum -y install ncurses-devel - +&& rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm \ +&& yum -y install qt5-qtbase-devel \ +ncurses-devel \ # Plugin library devil - # Plugin library gd -RUN yum -y install gd-devel - +gd-devel \ # Plugin library ghostscipt -RUN yum -y install ghostscript-devel - +ghostscript-devel \ # Plugin library gtk -RUN yum -y install gtk2-devel - +gtk2-devel \ # Plugin library lasi - # Plugin library pangocairo - # Plugin library poppler -RUN yum -y install poppler-glib-devel -RUN yum -y install poppler-qt - +poppler-glib-devel \ +poppler-qt \ # Plugin library rsvg -RUN yum -y install librsvg2-devel - +librsvg2-devel \ # Plugin library webp - # Language extension gv_sharp & gv_ruby -RUN yum -y install ruby - +ruby \ # Language extension gv_go - # Language extension gv_guile -RUN yum -y install guile-devel - +guile-devel \ # Language extension gv_java -RUN yum -y install java-devel - +java-devel \ # Language extension gv_lua -RUN yum -y install lua-devel - +lua-devel \ # Language extension gv_ocaml -RUN yum -y install ocaml - +ocaml \ # Language extension gv_perl -RUN yum -y install perl-ExtUtils-Embed - +perl-ExtUtils-Embed \ # Language extension gv_php -RUN yum -y install php-devel -RUN yum -y install bzip2-devel -RUN yum -y install pcre-devel -RUN yum -y install openssl-devel - +php-devel \ +bzip2-devel \ +pcre-devel \ +openssl-devel \ # Language extension gv_python & gv_python2 -RUN yum -y install python2-devel - +python2-devel \ # Language extension gv_python3 -RUN yum -y install python34-devel - +python34-devel \ # Language extension gv_ruby -RUN yum -y install ruby-devel - +ruby-devel \ # Language extension gv_tcl -RUN yum -y install tcl-devel - +tcl-devel \ # Requred in redhat/graphviz.spec.fedora.in -RUN yum -y install libICE-devel -RUN yum -y install libSM-devel -RUN yum -y install libXaw-devel -RUN yum -y install tk-devel - +libICE-devel \ +libSM-devel \ +libXaw-devel \ +tk-devel \ # Test utilities -RUN yum -y install -y python2-pytest -RUN yum -y install -y python34-pytest - +python2-pytest \ +python34-pytest \ # Clean up -RUN yum clean all && rm -rf /var/cache/yum +&& yum clean all && rm -rf /var/cache/yum diff --git a/ci/centos7/Dockerfile b/ci/centos7/Dockerfile index f6160c1a5..84b0fd515 100644 --- a/ci/centos7/Dockerfile +++ b/ci/centos7/Dockerfile @@ -5,97 +5,68 @@ RUN yum -y groupinstall 'Development Tools' RUN ln -s /usr/lib64/libedit.so.0 /usr/lib64/libedit.so # Centos build utilities -RUN yum -y install libtool-ltdl-devel -RUN yum -y install ksh -RUN yum -y install cmake - +RUN yum -y install \ +libtool-ltdl-devel \ +ksh \ +cmake \ # Option glut -RUN yum -y install freeglut-devel - +freeglut-devel \ # Option gts - # Option swig -RUN yum -y install swig - +swig \ # Command lefty - # Command smyra - # Command gvedit -RUN yum -y install qt5-qtbase-devel -RUN yum -y install ncurses-devel - +qt5-qtbase-devel \ +ncurses-devel \ # Plugin library devil - # Plugin library gd -RUN yum -y install gd-devel - +gd-devel \ # Plugin library ghostscipt -RUN yum -y install ghostscript-devel - +ghostscript-devel \ # Plugin library gtk -RUN yum -y install gtk2-devel - +gtk2-devel \ # Plugin library lasi - # Plugin library pangocairo - # Plugin library poppler -RUN yum -y install poppler-glib-devel -RUN yum -y install poppler-qt - +poppler-glib-devel \ +poppler-qt \ # Plugin library rsvg -RUN yum -y install librsvg2-devel - +librsvg2-devel \ # Plugin library webp - # Language extension gv_sharp & gv_ruby - # Language extension gv_go - # Language extension gv_guile -RUN yum -y install guile-devel - +guile-devel \ # Language extension gv_java -RUN yum -y install java-devel - +java-devel \ # Language extension gv_lua -RUN yum -y install lua-devel - +lua-devel \ # Language extension gv_ocaml -RUN yum -y install ocaml - +ocaml \ # Language extension gv_perl -RUN yum -y install perl-ExtUtils-Embed - +perl-ExtUtils-Embed \ # Language extension gv_php -RUN yum -y install php-devel -RUN yum -y install bzip2-devel -RUN yum -y install openssl-devel -RUN yum -y install libxml2-devel - +php-devel \ +bzip2-devel \ +openssl-devel \ +libxml2-devel \ # Language extension gv_python & gv_python2 -RUN yum -y install python2-devel - +python2-devel \ # Language extension gv_python3 -RUN yum -y install python3-devel - +python3-devel \ # Language extension gv_ruby -RUN yum -y install ruby-devel - +ruby-devel \ # Language extension gv_tcl -RUN yum -y install tcl-devel - +tcl-devel \ # Requred in redhat/graphviz.spec.fedora.in -RUN yum -y install libICE-devel -RUN yum -y install libSM-devel -RUN yum -y install libXaw-devel -RUN yum -y install tk-devel - +libICE-devel \ +libSM-devel \ +libXaw-devel \ +tk-devel \ # Test utilities -RUN yum -y install -y python-pytest -RUN rpm --install https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/p/python36-py-1.4.32-2.el7.noarch.rpm -RUN rpm --install https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/p/python36-pytest-2.9.2-4.el7.noarch.rpm - +python-pytest \ +&& rpm --install https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/p/python36-py-1.4.32-2.el7.noarch.rpm \ +&& rpm --install https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/p/python36-pytest-2.9.2-4.el7.noarch.rpm \ # Clean up -RUN yum clean all && rm -rf /var/cache/yum +&& yum clean all && rm -rf /var/cache/yum diff --git a/ci/centos8/Dockerfile b/ci/centos8/Dockerfile index 067c7c685..66dbdea64 100644 --- a/ci/centos8/Dockerfile +++ b/ci/centos8/Dockerfile @@ -6,95 +6,66 @@ RUN ln -s /usr/lib64/libedit.so.0 /usr/lib64/libedit.so RUN dnf config-manager --set-enabled PowerTools # Centos build utilities -RUN yum -y install libtool-ltdl-devel -RUN yum -y install ksh -RUN yum -y install cmake - +RUN yum -y install \ +libtool-ltdl-devel \ +ksh \ +cmake \ # Option glut -RUN yum -y install freeglut-devel - +freeglut-devel \ # Option gts - # Option swig -RUN yum -y install swig - +swig \ # Command lefty - # Command smyra - # Command gvedit -RUN yum -y install qt5-devel -RUN yum -y install ncurses-devel - +qt5-devel \ +ncurses-devel \ # Plugin library devil - # Plugin library gd -RUN yum -y install gd-devel - +gd-devel \ # Plugin library ghostscipt -RUN yum -y install ghostscript-devel - +ghostscript-devel \ # Plugin library gtk -RUN yum -y install gtk2-devel - +gtk2-devel \ # Plugin library lasi - # Plugin library pangocairo - # Plugin library poppler -RUN yum -y install poppler-glib-devel -RUN yum -y install poppler-qt5 - +poppler-glib-devel \ +poppler-qt5 \ # Plugin library rsvg -RUN yum -y install librsvg2-devel - +librsvg2-devel \ # Plugin library webp - # Language extension gv_sharp & gv_ruby - # Language extension gv_go - # Language extension gv_guile -RUN yum -y install guile-devel - +guile-devel \ # Language extension gv_java -RUN yum -y install java-devel - +java-devel \ # Language extension gv_lua -RUN yum -y install lua-devel - +lua-devel \ # Language extension gv_ocaml -RUN yum -y install ocaml - +ocaml \ # Language extension gv_perl -RUN yum -y install perl-ExtUtils-Embed - +perl-ExtUtils-Embed \ # Language extension gv_php -RUN yum -y install php-devel -RUN yum -y install openssl-devel -RUN yum -y install libxml2-devel - +php-devel \ +openssl-devel \ +libxml2-devel \ # Language extension gv_python & gv_python2 -RUN yum -y install python2-devel - +python2-devel \ # Language extension gv_python3 -RUN yum -y install python3-devel - +python3-devel \ # Language extension gv_ruby -RUN yum -y install ruby-devel - +ruby-devel \ # Language extension gv_tcl -RUN yum -y install tcl-devel - +tcl-devel \ # Requred in redhat/graphviz.spec.fedora.in -RUN yum -y install libICE-devel -RUN yum -y install libSM-devel -RUN yum -y install libXaw-devel -RUN yum -y install tk-devel - +libICE-devel \ +libSM-devel \ +libXaw-devel \ +tk-devel \ # Test utilities -RUN yum -y install -y python2-pytest -RUN yum -y install -y python3-pytest - +python2-pytest \ +python3-pytest \ # Clean up -RUN yum clean all && rm -rf /var/cache/yum +&& yum clean all && rm -rf /var/cache/yum -- 2.40.0