diff --git a/Dockerfile b/Dockerfile index 7e1846a..6246ec8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETPLATFORM rockylinux:8.8 +FROM --platform=$TARGETPLATFORM rockylinux/rockylinux:9.4 LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \ Vendor="TIER" \ @@ -8,17 +8,17 @@ LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \ ARG GROUPER_CONTAINER_VERSION -ENV GROUPER_VERSION=5.11.3 \ - GROUPER_CONTAINER_VERSION=5.11.3 \ +ENV GROUPER_VERSION=5.12.0 \ + GROUPER_CONTAINER_VERSION=5.12.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 mod_ssl cronie -RUN yum update -y \ - && yum install -y logrotate python3-pip rsync sudo patch wget tar unzip dos2unix file net-tools diffutils curl mlocate logrotate strace telnet man vim rsyslog cronie findutils procps \ +RUN dnf update -y \ + && dnf install -y logrotate python3-pip rsync sudo patch wget tar unzip dos2unix file net-tools diffutils curl mlocate logrotate strace telnet man vim rsyslog cronie findutils procps \ && 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 +29,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 8293e6e..0935d95 100644 --- a/Dockerfile2 +++ b/Dockerfile2 @@ -16,14 +16,14 @@ ENV GROUPER_VERSION=4.1.0 \ 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 mod_ssl dos2unix cronie && \ - yum clean all +RUN rm -fr /var/cache/yum/* && dnf clean all && dnf -y install --setopt=tsflags=nodocs epel-release && dnf -y update && \ + dnf -y install net-tools wget curl tar unzip mlocate logrotate strace telnet man vim rsyslog cron mod_ssl dos2unix cronie && \ + dnf clean all -RUN yum update -y \ - && yum install -y logrotate python3-pip rsync sudo patch wget tar unzip dos2unix file \ +RUN dnf update -y \ + && dnf install -y logrotate python3-pip rsync sudo patch wget tar unzip dos2unix file \ && pip3 install --upgrade setuptools \ - && yum clean -y all \ + && dnf clean -y all \ && groupadd -r tomcat \ && useradd -r -m -s /sbin/nologin -g tomcat tomcat \ && mkdir -p /opt/container_files diff --git a/Dockerfile_centos b/Dockerfile_centos deleted file mode 100644 index 6970682..0000000 --- a/Dockerfile_centos +++ /dev/null @@ -1,59 +0,0 @@ -FROM i2incommon/grouper:4.1.5 as grouperContainer - -FROM centos:centos7 - -COPY --from=grouperContainer /opt /opt -COPY --from=grouperContainer /usr/local/bin /usr/local/bin - - -LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \ - Vendor="TIER" \ - ImageType="Grouper" \ - ImageName=$imagename \ - ImageOS=centos7 - -ARG GROUPER_CONTAINER_VERSION - -ENV GROUPER_VERSION=4.1.5 \ - GROUPER_CONTAINER_VERSION=4.1.5 \ - 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 rm -fr /var/cache/yum/* && yum clean all && yum -y install --setopt=tsflags=nodocs epel-release \ - && yum update -y \ - && yum install -y logrotate python3-pip rsync sudo patch supervisor wget tar unzip dos2unix file net-tools curl mlocate logrotate strace telnet man vim rsyslog cronie httpd mod_ssl findutils \ - && pip3 install --upgrade setuptools \ - && yum clean -y all \ - && groupadd -r tomcat \ - && useradd -r -m -s /sbin/nologin -g tomcat tomcat - -# Install Corretto Java JDK -#Corretto download page: https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.html - -# 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 - -RUN /opt/container_files/docker-build-bin/containerDockerfileInstallPermissions.sh tomcat root - -# testing container -# docker build -f Dockerfile_centos -t mygrouper -# see output with -# DOCKER_BUILDKIT=0 docker build --progress=plain -t mygrouper . -# docker run --detach --name mygrouper mygrouper:latest -# docker exec -it mygrouper bash -# docker run --detach -e GROUPER_SELF_SIGNED_CERT=true -e GROUPER_MAX_MEMORY='3g' -e GROUPER_RUN_SHIB_SP=false -e GROUPERSYSTEM_QUICKSTART_PASS=pass -e GROUPER_UI_GROUPER_AUTH=true -e GROUPER_DATABASE_URL=jdbc:postgresql://host.docker.internal:5433/grouper -e GROUPER_DATABASE_USERNAME=grouper -e GROUPER_DATABASE_PASSWORD=pass -e GROUPER_AUTO_DDL_UPTOVERSION='v4.*.*' -e GROUPER_UI_CONFIGURATION_EDITOR_SOURCEIPADDRESSES='0.0.0.0/0' -e GROUPER_START_DELAY_SECONDS=10 --publish 8081:8080 -e GROUPER_RUN_APACHE=false --name mygrouper mygrouper:latest ui - - - -WORKDIR /opt/grouper/grouperWebapp/WEB-INF/ -EXPOSE 80 443 -HEALTHCHECK NONE - -ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] -#ENTRYPOINT ["ping"] -#CMD ["google.com"] 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