diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9cf26bcbc1..b04fd47f87 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -92,7 +92,7 @@ filesystem utilities (`btrfs-progs`, `ocfs2-tools`, `nfs-utils`). - Don't install any interactive/user tools, e.g. things like `vim`, `less` or `man`. Debugging should be done prior to the image submission. - Don't install `wget` as the base images already include `curl`. -- Always remember to run `yum clean all` in the same `RUN` directive as a +- Always remember to run `rm -rf /var/cache/yum` in the same `RUN` directive as a `yum install` so that the yum metadata is not stored in the layer. - Always document any inputs (via `--build-arg` or `-e`) required by `docker build` or `docker run`. This documentation should also clearly state diff --git a/GlassFish/4.1.1-web/Dockerfile b/GlassFish/4.1.1-web/Dockerfile index bbd4a0e8c1..48130cf23f 100644 --- a/GlassFish/4.1.1-web/Dockerfile +++ b/GlassFish/4.1.1-web/Dockerfile @@ -25,7 +25,7 @@ RUN yum -y install unzip java-1.7.0-openjdk-devel && \ unzip -o $GLASSFISH_PKG && \ rm -f $GLASSFISH_PKG && \ yum -y remove unzip && \ - yum clean all + rm -rf /var/cache/yum COPY docker-entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] diff --git a/GlassFish/4.1.1/Dockerfile b/GlassFish/4.1.1/Dockerfile index f0d86192e3..b724bc5c7b 100644 --- a/GlassFish/4.1.1/Dockerfile +++ b/GlassFish/4.1.1/Dockerfile @@ -25,7 +25,7 @@ RUN yum -y install unzip java-1.7.0-openjdk-devel && \ unzip -o $GLASSFISH_PKG && \ rm -f $GLASSFISH_PKG && \ yum -y remove unzip && \ - yum clean all + rm -rf /var/cache/yum COPY docker-entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] diff --git a/GlassFish/4.1.2-web/Dockerfile b/GlassFish/4.1.2-web/Dockerfile index b91c1c5278..252853bd85 100644 --- a/GlassFish/4.1.2-web/Dockerfile +++ b/GlassFish/4.1.2-web/Dockerfile @@ -25,7 +25,7 @@ RUN yum -y install unzip java-1.7.0-openjdk-devel && \ unzip -o $GLASSFISH_PKG && \ rm -f $GLASSFISH_PKG && \ yum -y remove unzip && \ - yum clean all + rm -rf /var/cache/yum COPY docker-entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] diff --git a/GlassFish/4.1.2/Dockerfile b/GlassFish/4.1.2/Dockerfile index 59f15a92d6..4b10f9a734 100644 --- a/GlassFish/4.1.2/Dockerfile +++ b/GlassFish/4.1.2/Dockerfile @@ -25,7 +25,7 @@ RUN yum -y install unzip java-1.7.0-openjdk-devel && \ unzip -o $GLASSFISH_PKG && \ rm -f $GLASSFISH_PKG && \ yum -y remove unzip && \ - yum clean all + rm -rf /var/cache/yum COPY docker-entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] diff --git a/GlassFish/5.0-web/Dockerfile b/GlassFish/5.0-web/Dockerfile index 53a8836df9..772cc6a9c2 100644 --- a/GlassFish/5.0-web/Dockerfile +++ b/GlassFish/5.0-web/Dockerfile @@ -25,7 +25,7 @@ RUN yum -y install unzip java-1.8.0-openjdk-devel && \ unzip -o $GLASSFISH_PKG && \ rm -f $GLASSFISH_PKG && \ yum -y remove unzip && \ - yum clean all + rm -rf /var/cache/yum COPY docker-entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] diff --git a/GlassFish/5.0/Dockerfile b/GlassFish/5.0/Dockerfile index 6817ab7d7e..5e3e64698b 100644 --- a/GlassFish/5.0/Dockerfile +++ b/GlassFish/5.0/Dockerfile @@ -25,7 +25,7 @@ RUN yum -y install unzip java-1.8.0-openjdk-devel && \ unzip -o $GLASSFISH_PKG && \ rm -f $GLASSFISH_PKG && \ yum -y remove unzip && \ - yum clean all + rm -rf /var/cache/yum COPY docker-entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] diff --git a/GlassFish/nightly-web/Dockerfile b/GlassFish/nightly-web/Dockerfile index 666077a7f3..b0dd96db61 100644 --- a/GlassFish/nightly-web/Dockerfile +++ b/GlassFish/nightly-web/Dockerfile @@ -23,7 +23,7 @@ RUN yum -y install unzip java-1.8.0-openjdk-devel && \ unzip -o $GLASSFISH_PKG && \ rm -f $GLASSFISH_PKG && \ yum -y remove unzip && \ - yum clean all + rm -rf /var/cache/yum COPY docker-entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] diff --git a/GlassFish/nightly/Dockerfile b/GlassFish/nightly/Dockerfile index 4e7e990334..65e6e346ba 100644 --- a/GlassFish/nightly/Dockerfile +++ b/GlassFish/nightly/Dockerfile @@ -23,7 +23,7 @@ RUN yum -y install unzip java-1.8.0-openjdk-devel && \ unzip -o $GLASSFISH_PKG && \ rm -f $GLASSFISH_PKG && \ yum -y remove unzip && \ - yum clean all + rm -rf /var/cache/yum COPY docker-entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] diff --git a/GraalVM/graalvm-0.22/Dockerfile b/GraalVM/graalvm-0.22/Dockerfile index 14514fcc0d..db674985f5 100644 --- a/GraalVM/graalvm-0.22/Dockerfile +++ b/GraalVM/graalvm-0.22/Dockerfile @@ -12,7 +12,7 @@ ENV GRAALVM_PKG=graalvm-0.22-linux-amd64-jdk8.tar.gz \ ADD $GRAALVM_PKG /usr/ -RUN yum -y install gcc && yum clean all && \ +RUN yum -y install gcc && rm -rf /var/cache/yum && \ alternatives --install /usr/bin/java java $JAVA_HOME/bin/java 20000 && \ alternatives --install /usr/bin/javac javac $JAVA_HOME/bin/javac 20000 && \ alternatives --install /usr/bin/jar jar $JAVA_HOME/bin/jar 20000 diff --git a/OpenJDK/java-6/Dockerfile b/OpenJDK/java-6/Dockerfile index fef78a10ef..5ac8bfe4d2 100644 --- a/OpenJDK/java-6/Dockerfile +++ b/OpenJDK/java-6/Dockerfile @@ -8,7 +8,7 @@ FROM oraclelinux:7-slim MAINTAINER Bruno Borges -RUN yum -y install java-1.6.0-openjdk-devel && yum clean all +RUN yum -y install java-1.6.0-openjdk-devel && rm -rf /var/cache/yum ENV JAVA_HOME /usr/lib/jvm/java-openjdk diff --git a/OpenJDK/java-7/Dockerfile b/OpenJDK/java-7/Dockerfile index 047afe70cf..11e93d10fe 100644 --- a/OpenJDK/java-7/Dockerfile +++ b/OpenJDK/java-7/Dockerfile @@ -8,7 +8,7 @@ FROM oraclelinux:7-slim MAINTAINER Bruno Borges -RUN yum -y install java-1.7.0-openjdk-devel && yum clean all +RUN yum -y install java-1.7.0-openjdk-devel && rm -rf /var/cache/yum ENV JAVA_HOME /usr/lib/jvm/java-openjdk diff --git a/OpenJDK/java-8/Dockerfile b/OpenJDK/java-8/Dockerfile index 3442fd4424..17d02b98de 100644 --- a/OpenJDK/java-8/Dockerfile +++ b/OpenJDK/java-8/Dockerfile @@ -8,7 +8,7 @@ FROM oraclelinux:7-slim MAINTAINER Bruno Borges -RUN yum -y install java-1.8.0-openjdk-devel && yum clean all +RUN yum -y install java-1.8.0-openjdk-devel && rm -rf /var/cache/yum ENV JAVA_HOME /usr/lib/jvm/java-openjdk diff --git a/OracleBI/dockerfiles/12.2.1.2/Dockerfile b/OracleBI/dockerfiles/12.2.1.2/Dockerfile index fb18e5d34d..038cd828d0 100644 --- a/OracleBI/dockerfiles/12.2.1.2/Dockerfile +++ b/OracleBI/dockerfiles/12.2.1.2/Dockerfile @@ -50,7 +50,7 @@ COPY $BI_DISTRO_ZIP1 $BI_DISTRO_ZIP2 install.file oraInst.loc /u01/ USER root # tools for installing and running BI -RUN yum -y install unzip hostname && yum clean all +RUN yum -y install unzip hostname && rm -rf /var/cache/yum USER oracle RUN cd /u01 && unzip $BI_DISTRO_ZIP1 && unzip $BI_DISTRO_ZIP2 && cd - && \ diff --git a/OracleDatabase/dockerfiles/11.2.0.2/Dockerfile.xe b/OracleDatabase/dockerfiles/11.2.0.2/Dockerfile.xe index 010c63b6ae..a741e929ef 100644 --- a/OracleDatabase/dockerfiles/11.2.0.2/Dockerfile.xe +++ b/OracleDatabase/dockerfiles/11.2.0.2/Dockerfile.xe @@ -54,7 +54,7 @@ COPY $INSTALL_FILE_1 $CONFIG_RSP $RUN_FILE $PWD_FILE $INSTALL_DIR/ # ------------------------------ RUN yum -y install unzip libaio bc initscripts net-tools openssl && \ - yum clean all && \ + rm -rf /var/cache/yum && \ cd $INSTALL_DIR && \ unzip $INSTALL_FILE_1 && \ rm $INSTALL_FILE_1 && \ diff --git a/OracleDatabase/dockerfiles/12.1.0.2/setupLinuxEnv.sh b/OracleDatabase/dockerfiles/12.1.0.2/setupLinuxEnv.sh index cf27608221..e96046ee69 100755 --- a/OracleDatabase/dockerfiles/12.1.0.2/setupLinuxEnv.sh +++ b/OracleDatabase/dockerfiles/12.1.0.2/setupLinuxEnv.sh @@ -19,6 +19,6 @@ ln -s $ORACLE_BASE/scripts /docker-entrypoint-initdb.d && \ mkdir $ORACLE_BASE/oradata && \ chmod ug+x $ORACLE_BASE/*.sh && \ yum -y install oracle-rdbms-server-12cR1-preinstall unzip tar openssl && \ -yum clean all && \ +rm -rf /var/cache/yum && \ echo oracle:oracle | chpasswd && \ chown -R oracle:dba $ORACLE_BASE diff --git a/OracleDatabase/dockerfiles/12.2.0.1/setupLinuxEnv.sh b/OracleDatabase/dockerfiles/12.2.0.1/setupLinuxEnv.sh index e8ef5beeea..0bc22b4357 100755 --- a/OracleDatabase/dockerfiles/12.2.0.1/setupLinuxEnv.sh +++ b/OracleDatabase/dockerfiles/12.2.0.1/setupLinuxEnv.sh @@ -19,6 +19,6 @@ ln -s $ORACLE_BASE/scripts /docker-entrypoint-initdb.d && \ mkdir $ORACLE_BASE/oradata && \ chmod ug+x $ORACLE_BASE/*.sh && \ yum -y install oracle-database-server-12cR2-preinstall unzip tar openssl && \ -yum clean all && \ +rm -rf /var/cache/yum && \ echo oracle:oracle | chpasswd && \ chown -R oracle:dba $ORACLE_BASE diff --git a/OracleFMWInfrastructure/dockerfiles/12.2.1.2/Dockerfile b/OracleFMWInfrastructure/dockerfiles/12.2.1.2/Dockerfile index 6bd893c294..d663fc51ea 100644 --- a/OracleFMWInfrastructure/dockerfiles/12.2.1.2/Dockerfile +++ b/OracleFMWInfrastructure/dockerfiles/12.2.1.2/Dockerfile @@ -59,7 +59,7 @@ COPY $FMW_PKG install.file oraInst.loc /u01/ RUN chown oracle:oracle -R /u01 && \ chmod +xr $SCRIPT_FILES && \ yum install -y libaio && \ - yum clean all + rm -rf /var/cache/yum # Install # ------------------------------------------------------------ diff --git a/OracleFMWInfrastructure/dockerfiles/12.2.1.3/Dockerfile b/OracleFMWInfrastructure/dockerfiles/12.2.1.3/Dockerfile index aeb84aa182..bb65819b61 100644 --- a/OracleFMWInfrastructure/dockerfiles/12.2.1.3/Dockerfile +++ b/OracleFMWInfrastructure/dockerfiles/12.2.1.3/Dockerfile @@ -59,7 +59,7 @@ COPY $FMW_PKG install.file oraInst.loc /u01/ RUN chown oracle:oracle -R /u01 && \ chmod +xr $SCRIPT_FILE && \ yum install -y libaio && \ - yum clean all + rm -rf /var/cache/yum # Install # ------------------------------------------------------------ diff --git a/OracleHTTPServer/dockerfiles/12.2.1.2.0/Dockerfile b/OracleHTTPServer/dockerfiles/12.2.1.2.0/Dockerfile index b3599cef7c..c472143cd1 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.2.0/Dockerfile +++ b/OracleHTTPServer/dockerfiles/12.2.1.2.0/Dockerfile @@ -68,7 +68,7 @@ COPY $OHS_PKG install.file oraInst.loc /u01/ #--------------------------------------------------------------------------------------------------------- # Proxy needs to be set before running yum in /etc/yum.conf RUN yum install -y unzip libaio sysstat && \ - yum clean all && \ + rm -rf /var/cache/yum && \ chmod a+xr /u01 && \ useradd -b /u01 -m -s /bin/bash oracle && \ mkdir /u01/oracle/.inventory && \ diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/Dockerfile b/OracleHTTPServer/dockerfiles/12.2.1.3.0/Dockerfile index df9b5d2f2e..ef31146816 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/Dockerfile +++ b/OracleHTTPServer/dockerfiles/12.2.1.3.0/Dockerfile @@ -65,7 +65,7 @@ COPY $OHS_PKG install.file oraInst.loc /u01/ # Setup filesystem and oracle user #--------------------------------------------------------------------------------------------------------- RUN yum install -y unzip libaio sysstat make psmisc gcc && \ - yum clean all && \ + rm -rf /var/cache/yum && \ chmod a+xr /u01 && \ useradd -b /u01 -m -s /bin/bash oracle && \ mkdir /u01/oracle/.inventory && \ diff --git a/OracleInstantClient/dockerfiles/12.2.0.1/Dockerfile b/OracleInstantClient/dockerfiles/12.2.0.1/Dockerfile index c457b163ef..721ebde269 100644 --- a/OracleInstantClient/dockerfiles/12.2.0.1/Dockerfile +++ b/OracleInstantClient/dockerfiles/12.2.0.1/Dockerfile @@ -28,7 +28,7 @@ FROM oraclelinux:7-slim ADD oracle-instantclient*.rpm /tmp/ RUN yum -y install /tmp/oracle-instantclient*.rpm && \ - yum clean all && \ + rm -rf /var/cache/yum && \ rm -f /tmp/oracle-instantclient*.rpm && \ echo /usr/lib/oracle/12.2/client64/lib > /etc/ld.so.conf.d/oracle-instantclient12.2.conf && \ ldconfig diff --git a/OracleTuxedo/tsam/dockerfiles/12.2.2/Dockerfile b/OracleTuxedo/tsam/dockerfiles/12.2.2/Dockerfile index c2483ba054..25bb2b13c1 100644 --- a/OracleTuxedo/tsam/dockerfiles/12.2.2/Dockerfile +++ b/OracleTuxedo/tsam/dockerfiles/12.2.2/Dockerfile @@ -51,7 +51,7 @@ RUN mkdir -p /u01/oracle && \ yum install -y vim tar net-tools && \ yum localinstall -y /u01/$ORACLT_PKG1 /u01/$ORACLT_PKG2 && \ rm -f /u01/$ORACLT_PKG1 /u01/$ORACLT_PKG2 && \ - yum clean all + rm -rf /var/cache/yum # Copy files # ----------