# HG changeset patch # User muxator # Date 1506812542 -7200 # Node ID 1baa077214aeae716c813b31d46b91617ef85dfb # Parent 2fd06499dc8e6a5a784b1334b925c289d7b54e4e docker: try to follow the best practices for writing Dockerfiles Merged multiple RUN instructions and sorted the arguments alphabetically Reference: https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/ diff -r 2fd06499dc8e -r 1baa077214ae contrib/docker/centos5 --- a/contrib/docker/centos5 Thu Aug 24 18:40:30 2017 +0200 +++ b/contrib/docker/centos5 Sun Oct 01 01:02:22 2017 +0200 @@ -1,9 +1,23 @@ FROM centos:centos5 -RUN sed -i 's/^mirrorlist/#mirrorlist/' /etc/yum.repos.d/*.repo -RUN sed -i 's/^#\(baseurl=\)http:\/\/mirror.centos.org\/centos/\1http:\/\/vault.centos.org/' /etc/yum.repos.d/*.repo -RUN sed -i 's/\$releasever/5.11/' /etc/yum.repos.d/*.repo -RUN yum install -y gcc make rpm-build gettext tar -RUN yum install -y python-devel python-docutils +RUN \ + sed -i 's/^mirrorlist/#mirrorlist/' /etc/yum.repos.d/*.repo && \ + sed -i 's/^#\(baseurl=\)http:\/\/mirror.centos.org\/centos/\1http:\/\/vault.centos.org/' /etc/yum.repos.d/*.repo && \ + sed -i 's/\$releasever/5.11/' /etc/yum.repos.d/*.repo + +RUN yum install -y \ + gcc \ + gettext \ + make \ + python-devel \ + python-docutils \ + rpm-build \ + tar + # For creating repo meta data -RUN yum install -y createrepo -RUN yum install -y readline-devel openssl-devel ncurses-devel zlib-devel bzip2-devel +RUN yum install -y \ + bzip2-devel \ + createrepo \ + ncurses-devel \ + openssl-devel \ + readline-devel \ + zlib-devel diff -r 2fd06499dc8e -r 1baa077214ae contrib/docker/centos6 --- a/contrib/docker/centos6 Thu Aug 24 18:40:30 2017 +0200 +++ b/contrib/docker/centos6 Sun Oct 01 01:02:22 2017 +0200 @@ -1,11 +1,20 @@ FROM centos:centos6 -RUN yum install -y gcc -RUN yum install -y python-devel python-docutils -RUN yum install -y make -RUN yum install -y rpm-build -RUN yum install -y gettext -RUN yum install -y tar +RUN yum install -y \ + gcc \ + gettext \ + make \ + python-devel \ + python-docutils \ + rpm-build \ + tar + # For creating repo meta data RUN yum install -y createrepo + # For python -RUN yum install -y readline-devel openssl-devel ncurses-devel zlib-devel bzip2-devel +RUN yum install -y \ + bzip2-devel \ + ncurses-devel \ + openssl-devel \ + readline-devel \ + zlib-devel diff -r 2fd06499dc8e -r 1baa077214ae contrib/docker/centos7 --- a/contrib/docker/centos7 Thu Aug 24 18:40:30 2017 +0200 +++ b/contrib/docker/centos7 Sun Oct 01 01:02:22 2017 +0200 @@ -1,9 +1,12 @@ FROM centos:centos7 -RUN yum install -y gcc -RUN yum install -y python-devel python-docutils -RUN yum install -y make -RUN yum install -y rpm-build -RUN yum install -y gettext -RUN yum install -y tar +RUN yum install -y \ + gcc \ + gettext \ + make \ + python-devel \ + python-docutils \ + rpm-build \ + tar + # For creating repo meta data RUN yum install -y createrepo diff -r 2fd06499dc8e -r 1baa077214ae contrib/docker/debian.template --- a/contrib/docker/debian.template Thu Aug 24 18:40:30 2017 +0200 +++ b/contrib/docker/debian.template Sun Oct 01 01:02:22 2017 +0200 @@ -2,11 +2,11 @@ RUN apt-get update && apt-get install -y \ build-essential \ debhelper \ + devscripts \ dh-python \ - devscripts \ less \ python \ python-all-dev \ python-docutils \ - zip \ - unzip + unzip \ + zip diff -r 2fd06499dc8e -r 1baa077214ae contrib/docker/fedora20 --- a/contrib/docker/fedora20 Thu Aug 24 18:40:30 2017 +0200 +++ b/contrib/docker/fedora20 Sun Oct 01 01:02:22 2017 +0200 @@ -1,8 +1,11 @@ FROM fedora:20 -RUN yum install -y gcc -RUN yum install -y python-devel python-docutils -RUN yum install -y make -RUN yum install -y rpm-build -RUN yum install -y gettext +RUN yum install -y \ + gcc \ + gettext \ + make \ + python-devel \ + python-docutils \ + rpm-build + # For creating repo meta data RUN yum install -y createrepo diff -r 2fd06499dc8e -r 1baa077214ae contrib/docker/fedora21 --- a/contrib/docker/fedora21 Thu Aug 24 18:40:30 2017 +0200 +++ b/contrib/docker/fedora21 Sun Oct 01 01:02:22 2017 +0200 @@ -1,8 +1,11 @@ FROM fedora:21 -RUN yum install -y gcc -RUN yum install -y python-devel python-docutils -RUN yum install -y make -RUN yum install -y rpm-build -RUN yum install -y gettext +RUN yum install -y \ + gcc \ + gettext \ + make \ + python-devel \ + python-docutils \ + rpm-build + # For creating repo meta data RUN yum install -y createrepo diff -r 2fd06499dc8e -r 1baa077214ae contrib/docker/ubuntu.template --- a/contrib/docker/ubuntu.template Thu Aug 24 18:40:30 2017 +0200 +++ b/contrib/docker/ubuntu.template Sun Oct 01 01:02:22 2017 +0200 @@ -2,11 +2,11 @@ RUN apt-get update && apt-get install -y \ build-essential \ debhelper \ + devscripts \ dh-python \ - devscripts \ less \ python \ python-all-dev \ python-docutils \ - zip \ - unzip + unzip \ + zip