From 929520e63d9e51ca7e7e51a71d56f476653fef99 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sat, 5 Oct 2019 10:08:03 +0200 Subject: Optimize dockerile --- Dockerfile | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 8824b53..28ac530 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,14 +2,16 @@ FROM centos:centos7 MAINTAINER Suren A. Chilingaryan ENV container centos-tools - -RUN [ -e /etc/yum.conf ] && sed -i '/tsflags=nodocs/d' /etc/yum.conf || true -# Reinstall all packages to get man pages for them -RUN yum -y reinstall "*" && yum clean all +COPY files/ / +RUN \ +# Reinstall all packages to get man pages for them + [ -e /etc/yum.conf ] && sed -i '/tsflags=nodocs/d' /etc/yum.conf || true; \ + yum -y reinstall "*" && yum clean all && \ + \ # Swap out the systemd-container package and install all useful packages -RUN yum-config-manager -y --add-repo http://ufo.kit.edu/ands/repos/centos74/ && \ + yum-config-manager -y --add-repo http://ufo.kit.edu/ands/repos/centos74/ && \ yum -y install \ yum-utils glibc-utils bash-completion less file sed findutils net-tools man-db which bc tar \ openssh-clients lftp curl samba-client \ @@ -18,16 +20,11 @@ RUN yum-config-manager -y --add-repo http://ufo.kit.edu/ands/repos/centos74/ && mc \ kubernetes-client && \ yum -y --nogpgcheck install NetPIPE \ - && yum clean all - -COPY sx.sh /bin/sx -RUN chmod 775 /bin/sx + && yum clean all && \ + \ + chmod 775 /bin/sx && \ + chmod g=u /etc/passwd -# For ugly applications which want to resolve user name -RUN chmod g=u /etc/passwd - -COPY docker-entrypoint.sh / ENTRYPOINT ["/docker-entrypoint.sh"] - -CMD [ "/bin/sx" ] +CMD [ "/usr/bin/sx" ] -- cgit v1.2.3