diff --git a/Dockerfile b/Dockerfile index 6246ec8..760e863 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ ENV GROUPER_VERSION=5.12.0 \ # net-tools curl mlocate strace telnet man vim rsyslog cron mod_ssl cronie 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 \ + && dnf --allowerasing 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 \ && dnf clean -y all \ && groupadd -g 994 -r tomcat \ @@ -29,16 +29,15 @@ RUN dnf 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 \ - && dnf install -y java-17-amazon-corretto-devel + && dnf --allowerasing 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/ -# TODO put this back in one command -RUN chmod +x /opt/container_files/docker-build-bin/*.sh -RUN /opt/container_files/docker-build-bin/containerDockerfileInstallDos2unix.sh /opt/container_files -RUN /opt/container_files/docker-build-bin/containerDockerfileInstallGrouper.sh $JAVA_HOME $GROUPER_VERSION -RUN /opt/container_files/docker-build-bin/containerDockerfileInstall.sh $JAVA_HOME $GROUPER_VERSION +RUN 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 \ + && /opt/container_files/docker-build-bin/containerDockerfileInstall.sh $JAVA_HOME $GROUPER_VERSION # testing container diff --git a/Dockerfile2 b/Dockerfile2 index 0935d95..b6b90e3 100644 --- a/Dockerfile2 +++ b/Dockerfile2 @@ -8,20 +8,20 @@ LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \ ARG GROUPER_CONTAINER_VERSION -ENV GROUPER_VERSION=4.1.0 \ - GROUPER_CONTAINER_VERSION=5.0.0 \ - JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto \ +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 RUN ln -sf /usr/share/zoneinfo/UTC /etc/localtime \ && echo "NETWORKING=yes" > /etc/sysconfig/network -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 && \ +RUN rm -fr /var/cache/yum/* && dnf clean all && dnf -y --allowerasing install --setopt=tsflags=nodocs epel-release && dnf -y update && \ + dnf -y --allowerasing install net-tools wget curl tar unzip mlocate logrotate strace telnet man vim rsyslog cron mod_ssl dos2unix cronie && \ dnf clean all RUN dnf update -y \ - && dnf install -y logrotate python3-pip rsync sudo patch wget tar unzip dos2unix file \ + && dnf --allowerasing install -y logrotate python3-pip rsync sudo patch wget tar unzip dos2unix file \ && pip3 install --upgrade setuptools \ && dnf clean -y all \ && groupadd -r tomcat \ diff --git a/build.sh b/build.sh index 6a1b0f4..c5117fd 100755 --- a/build.sh +++ b/build.sh @@ -1,3 +1,4 @@ #!/bin/bash -docker build -t my-grouper . +#docker build -t my-grouper . +docker buildx build --platform linux/arm64 -t my-grouper . \ No newline at end of file diff --git a/container_files/docker-build-bin/containerDockerfileInstallJava.sh b/container_files/docker-build-bin/containerDockerfileInstallJava.sh index 4b99ead..ca1acbd 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 -dnf install -y java-$JAVA_VERSION-amazon-corretto-devel +dnf --allowerasing install -y java-$JAVA_VERSION-amazon-corretto-devel returnCode=$? echo "grouperDockerfile; INFO: (containerDockerfileInstallJava.sh) dnf install -y java-$JAVA_VERSION-amazon-corretto-devel, result: $returnCode" if [ $returnCode != 0 ]; then exit $returnCode; fi