From 96d51e54695f767bb5f7fdbfae7bd48036513591 Mon Sep 17 00:00:00 2001 From: mchyzer <mchyzer@isc.upenn.edu> Date: Mon, 26 Aug 2024 19:21:51 -0400 Subject: [PATCH] upgrade to rocky 9 --- Dockerfile | 15 +++--- Dockerfile2 | 51 +++++++------------ .../containerDockerfileInstallJava.sh | 4 +- 3 files changed, 29 insertions(+), 41 deletions(-) diff --git a/Dockerfile b/Dockerfile index f30ff74..84f6c2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM i2incommon/shibboleth_sp:3.4.1_03082024_rocky8_multiarch +#FROM i2incommon/shibboleth_sp:3.4.1_03082024_rocky8_multiarch +FROM i2incommon/shibboleth_sp:3.4.1_05152024_rocky9_multiarch LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \ Vendor="TIER" \ @@ -8,17 +9,17 @@ LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \ ARG GROUPER_CONTAINER_VERSION -ENV GROUPER_VERSION=4.14.0 \ - GROUPER_CONTAINER_VERSION=4.14.0 \ +ENV GROUPER_VERSION=4.15.0 \ + GROUPER_CONTAINER_VERSION=4.15.0 \ JAVA_HOME=/usr/lib/jvm/java-17-amazon-corretto \ PATH=$PATH:$JAVA_HOME/bin \ GROUPER_HOME=/opt/grouper/grouperWebapp/WEB-INF # net-tools curl mlocate strace telnet man vim rsyslog cron httpd mod_ssl cronie -RUN yum update -y \ - && yum install -y diffutils logrotate python3-pip rsync sudo patch supervisor wget tar unzip dos2unix file \ +RUN dnf update -y \ + && dnf install -y diffutils logrotate python3-pip rsync sudo patch supervisor wget tar unzip dos2unix file \ && pip3 install --upgrade setuptools \ - && yum clean -y all \ + && dnf clean -y all \ && groupadd -g 994 -r tomcat \ && useradd -u 996 -r -m -s /sbin/nologin -g tomcat tomcat \ && mkdir -p /opt/container_files @@ -29,7 +30,7 @@ RUN yum update -y \ # Install Corretto Java JDK (newer more arch independent way) RUN rpm --import https://yum.corretto.aws/corretto.key \ && curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo \ - && yum install -y java-17-amazon-corretto-devel + && dnf install -y java-17-amazon-corretto-devel # real copy command (if not caching), uncomment this and change comments of COPY above to work on install script COPY container_files/ /opt/container_files/ diff --git a/Dockerfile2 b/Dockerfile2 index 6f141cc..39247c0 100644 --- a/Dockerfile2 +++ b/Dockerfile2 @@ -1,4 +1,5 @@ -FROM centos:centos7 +#FROM i2incommon/shibboleth_sp:3.4.1_03082024_rocky8_multiarch +FROM i2incommon/shibboleth_sp:3.4.1_05152024_rocky9_multiarch LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \ Vendor="TIER" \ @@ -8,52 +9,38 @@ LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \ ARG GROUPER_CONTAINER_VERSION -ENV GROUPER_VERSION=2.6.17 \ - GROUPER_CONTAINER_VERSION=$GROUPER_CONTAINER_VERSION \ - JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto \ +ENV GROUPER_VERSION=4.14.2 \ + GROUPER_CONTAINER_VERSION=4.14.2 \ + JAVA_HOME=/usr/lib/jvm/java-17-amazon-corretto \ PATH=$PATH:$JAVA_HOME/bin \ GROUPER_HOME=/opt/grouper/grouperWebapp/WEB-INF -RUN ln -sf /usr/share/zoneinfo/UTC /etc/localtime \ - && echo "NETWORKING=yes" > /etc/sysconfig/network -RUN rm -fr /var/cache/yum/* && yum clean all && yum -y install --setopt=tsflags=nodocs epel-release && yum -y update && \ - yum -y install net-tools wget curl tar unzip mlocate logrotate strace telnet man vim rsyslog cron httpd mod_ssl dos2unix cronie supervisor && \ - yum clean all - -RUN yum update -y \ - && yum install -y logrotate python3-pip rsync sudo patch supervisor wget tar unzip dos2unix file \ +# net-tools curl mlocate strace telnet man vim rsyslog cron httpd mod_ssl cronie +RUN dnf update -y \ + && dnf install -y diffutils logrotate python3-pip rsync sudo patch supervisor wget tar unzip dos2unix file \ && pip3 install --upgrade setuptools \ - && yum clean -y all \ - && groupadd -r tomcat \ - && useradd -r -m -s /sbin/nologin -g tomcat tomcat \ + && dnf clean -y all \ + && groupadd -g 994 -r tomcat \ + && useradd -u 996 -r -m -s /sbin/nologin -g tomcat tomcat \ && mkdir -p /opt/container_files # Install Corretto Java JDK #Corretto download page: https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.html -ARG JAVA_VERSION=1.8.0 - - -COPY container_files/docker-build-bin /opt/container_files/docker-build-bin/ -COPY container_files/morphString.properties /opt/container_files/ -COPY container_files/grouper.installer.properties /opt/container_files/ -RUN mkdir /opt/container_files/java-corretto -COPY container_files/java-corretto/corretto-signing-key.pub /opt/container_files/java-corretto -COPY container_files/tier-support /opt/container_files/tier-support/ -RUN cd /tmp \ - && chmod +x /opt/container_files/docker-build-bin/*.sh \ - && /opt/container_files/docker-build-bin/containerDockerfileInstallDos2unix.sh /opt/container_files \ - && /opt/container_files/docker-build-bin/containerDockerfileInstallJava.sh $JAVA_VERSION \ - && /opt/container_files/docker-build-bin/containerDockerfileInstallGrouper.sh $JAVA_HOME $GROUPER_VERSION - +# Install Corretto Java JDK (newer more arch independent way) +RUN rpm --import https://yum.corretto.aws/corretto.key \ + && curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo \ + && dnf install -y java-17-amazon-corretto-devel # real copy command (if not caching), uncomment this and change comments of COPY above to work on install script COPY container_files/ /opt/container_files/ RUN cd /tmp \ - && mkdir /etc/shibboleth \ && chmod +x /opt/container_files/docker-build-bin/*.sh \ && /opt/container_files/docker-build-bin/containerDockerfileInstallDos2unix.sh /opt/container_files \ + && /opt/container_files/docker-build-bin/containerDockerfileInstallGrouper.sh $JAVA_HOME $GROUPER_VERSION + +RUN cd /tmp \ && /opt/container_files/docker-build-bin/containerDockerfileInstall.sh $JAVA_HOME $GROUPER_VERSION @@ -64,7 +51,7 @@ RUN cd /tmp \ # docker exec -it mygrouper bash WORKDIR /opt/grouper/grouperWebapp/WEB-INF/ -EXPOSE 80 443 +EXPOSE 80 443 8080 8443 HEALTHCHECK NONE #ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] diff --git a/container_files/docker-build-bin/containerDockerfileInstallJava.sh b/container_files/docker-build-bin/containerDockerfileInstallJava.sh index e39ff36..4b99ead 100644 --- a/container_files/docker-build-bin/containerDockerfileInstallJava.sh +++ b/container_files/docker-build-bin/containerDockerfileInstallJava.sh @@ -14,7 +14,7 @@ returnCode=$? echo "grouperDockerfile; INFO: (containerDockerfileInstallJava.sh) curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo, result: $returnCode" if [ $returnCode != 0 ]; then exit $returnCode; fi -yum install -y java-$JAVA_VERSION-amazon-corretto-devel +dnf install -y java-$JAVA_VERSION-amazon-corretto-devel returnCode=$? -echo "grouperDockerfile; INFO: (containerDockerfileInstallJava.sh) yum install -y java-$JAVA_VERSION-amazon-corretto-devel, result: $returnCode" +echo "grouperDockerfile; INFO: (containerDockerfileInstallJava.sh) dnf install -y java-$JAVA_VERSION-amazon-corretto-devel, result: $returnCode" if [ $returnCode != 0 ]; then exit $returnCode; fi