]> granicus.if.org Git - graphviz/commitdiff
Smoosh some Dockerfile layers into one
authorMark Hansen <markhansen@google.com>
Sun, 14 Feb 2021 05:51:42 +0000 (16:51 +1100)
committerMark Hansen <markhansen@google.com>
Sun, 14 Feb 2021 05:51:42 +0000 (16:51 +1100)
This is kind of a test for the new automatic building of dockerfiles.

This should make for smaller images and slightly faster CI runs.

The tradeoff is slower local builds if you'd cached the earlier bits.

But now we can easily build these on the cloud when changed.

ci/centos7/Dockerfile
ci/centos8/Dockerfile

index 265a81fa9f2bb82b40ea2b6340c8abd4aee7bbb5..216ce1f503a61c3f5120c2b05a28615976831007 100644 (file)
@@ -1,20 +1,17 @@
 FROM centos:7
 
 # Development tools
-RUN yum -y groupinstall 'Development Tools'
-
-RUN yum install -y \
+RUN yum -y groupinstall 'Development Tools' \
+&& yum install -y \
 # Install epel-release rpm (Needed for cmake3. Must be a separate step)
 https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-12.noarch.rpm \
 # Install ius-release rpm (Needed for git version 2. Must be a separate step)
 https://repo.ius.io/ius-release-el7.rpm \
-&& yum clean all && rm -rf /var/cache/yum
-
+&& yum clean all && rm -rf /var/cache/yum \
 # Remove old version of git
-RUN yum -y remove git
-
+&& yum -y remove git \
 # Centos build utilities
-RUN yum -y install \
+&& yum -y install \
 libtool-ltdl-devel \
 libedit-devel \
 ksh \
index f658bd7ca743ea5ca95cd181c1a5f6bd8063fb7d..41651743a8908d376182db59eea7cad37fc7c038 100644 (file)
@@ -1,11 +1,10 @@
 FROM centos:8
 
 # Development tools
-RUN yum -y groupinstall 'Development Tools'
-RUN dnf config-manager --set-enabled powertools
-
+RUN yum -y groupinstall 'Development Tools' \
+&& dnf config-manager --set-enabled powertools \
 # Centos build utilities
-RUN yum -y install \
+&& yum -y install \
 libtool-ltdl-devel \
 libedit-devel \
 ksh \