Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: docker/grouper
base: main
Choose a base ref
...
head repository: docker/grouper
compare: 2.6.14-rockylinux8-test
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.

Commits on Feb 11, 2020

  1. Update Dockerfile

    chubing committed Feb 11, 2020
    Copy the full SHA
    b85cda4 View commit details
  2. Copy the full SHA
    e971290 View commit details
  3. Copy the full SHA
    a57566b View commit details
  4. Update Dockerfile

    chubing committed Feb 11, 2020
    Copy the full SHA
    5e1d061 View commit details
  5. Copy the full SHA
    9c457e5 View commit details

Commits on Feb 13, 2020

  1. Copy the full SHA
    95cce47 View commit details
  2. Update Dockerfile

    chubing committed Feb 13, 2020
    Copy the full SHA
    06f7782 View commit details
  3. Copy the full SHA
    88a1da5 View commit details
  4. Delete web.xml

    chubing committed Feb 13, 2020
    Copy the full SHA
    bde3787 View commit details
  5. Update grouper-www.conf

    chubing committed Feb 13, 2020
    Copy the full SHA
    1ace64a View commit details
  6. Delete grouper-ws-scim.xml

    chubing committed Feb 13, 2020
    Copy the full SHA
    8c979d5 View commit details
  7. Delete grouper-ws.xml

    chubing committed Feb 13, 2020
    Copy the full SHA
    f098964 View commit details
  8. Update grouper.xml

    chubing committed Feb 13, 2020
    Copy the full SHA
    142820e View commit details
  9. Update library.sh

    chubing committed Feb 13, 2020
    Copy the full SHA
    c96c12b View commit details
  10. Update Dockerfile

    chubing committed Feb 13, 2020
    Copy the full SHA
    c39255a View commit details
  11. Update Dockerfile

    chubing committed Feb 13, 2020
    Copy the full SHA
    4068359 View commit details
  12. Update Dockerfile

    chubing committed Feb 13, 2020
    Copy the full SHA
    166e61f View commit details
  13. Update Dockerfile

    chubing committed Feb 13, 2020
    Copy the full SHA
    8aa7b99 View commit details
  14. Copy the full SHA
    30d275b View commit details
  15. Copy the full SHA
    d3c6758 View commit details
  16. enabling tests

    chubing committed Feb 13, 2020
    Copy the full SHA
    dbc87bb View commit details
  17. Update Dockerfile

    chubing committed Feb 13, 2020
    Copy the full SHA
    6eefaba View commit details
  18. Update Dockerfile

    chubing committed Feb 13, 2020
    Copy the full SHA
    e393bd0 View commit details
  19. Update Jenkinsfile

    chubing committed Feb 13, 2020
    Copy the full SHA
    ffbcefe View commit details
  20. fix grouper_home

    chubing committed Feb 13, 2020
    Copy the full SHA
    331a1c7 View commit details

Commits on Feb 16, 2020

  1. Update Dockerfile

    chubing committed Feb 16, 2020
    Copy the full SHA
    8e489c3 View commit details

Commits on Feb 17, 2020

  1. Update Dockerfile

    chubing committed Feb 17, 2020
    Copy the full SHA
    e4da113 View commit details
  2. Update Dockerfile

    chubing committed Feb 17, 2020
    Copy the full SHA
    f0ba413 View commit details
  3. Update Dockerfile

    chubing committed Feb 17, 2020
    Copy the full SHA
    d129666 View commit details
  4. Update Dockerfile

    chubing committed Feb 17, 2020
    Copy the full SHA
    620c33d View commit details
  5. Update Dockerfile

    chubing committed Feb 17, 2020
    Copy the full SHA
    b9814f6 View commit details
  6. Update Dockerfile

    chubing committed Feb 17, 2020
    Copy the full SHA
    ee1285a View commit details
  7. Update Dockerfile

    chubing committed Feb 17, 2020
    Copy the full SHA
    ab16d9a View commit details
  8. Update Dockerfile

    chubing committed Feb 17, 2020
    Copy the full SHA
    4b7ce76 View commit details
  9. update GROUPER_HOME

    chubing committed Feb 17, 2020
    Copy the full SHA
    5f68f61 View commit details
  10. correto java jvm

    chubing committed Feb 17, 2020
    Copy the full SHA
    b54716d View commit details
  11. Copy the full SHA
    46905d0 View commit details
  12. Update Dockerfile

    chubing committed Feb 17, 2020
    Copy the full SHA
    ed705f6 View commit details
  13. Update main.bats

    chubing committed Feb 17, 2020
    Copy the full SHA
    bb0e780 View commit details
  14. Update library.sh

    chubing committed Feb 17, 2020
    Copy the full SHA
    72f3e6f View commit details
  15. Update main.bats

    chubing committed Feb 17, 2020
    Copy the full SHA
    63d42f8 View commit details
  16. Create morphString.properties

    chubing committed Feb 17, 2020
    Copy the full SHA
    a96ab7f View commit details
  17. Update docker-compose.yml

    chubing committed Feb 17, 2020
    Copy the full SHA
    719997c View commit details
  18. Update docker-compose.yml

    chubing committed Feb 17, 2020
    Copy the full SHA
    bbf2b4e View commit details

Commits on Feb 18, 2020

  1. updates for 2.5

    chubing committed Feb 18, 2020
    Copy the full SHA
    55d16d2 View commit details
  2. Update main.bats

    chubing committed Feb 18, 2020
    Copy the full SHA
    4cd026c View commit details
  3. remove other JVM references

    chubing committed Feb 18, 2020
    Copy the full SHA
    778c111 View commit details
  4. Update Jenkinsfile

    chubing committed Feb 18, 2020
    Copy the full SHA
    d4f0011 View commit details
  5. Update supervisord-tomee.conf

    chubing committed Feb 18, 2020
    Copy the full SHA
    8920eb3 View commit details

Commits on Feb 20, 2020

  1. Update README.md

    chubing committed Feb 20, 2020
    Copy the full SHA
    611456d View commit details
Showing with 5,646 additions and 1,778 deletions.
  1. +1 −0 .gitignore
  2. +85 −112 Dockerfile
  3. +16 −23 Jenkinsfile
  4. +1 −1 LICENSE
  5. +4 −367 README.md
  6. +1 −1 common.bash
  7. +52 −91 container_files/api/log4j.properties
  8. 0 container_files/api/log4j2.additionalAppenders.xml.txt
  9. 0 container_files/api/log4j2.additionalLoggers.xml.txt
  10. +175 −0 container_files/api/log4j2.xml
  11. BIN container_files/certs/TestSsl.class
  12. +39 −0 container_files/certs/TestSsl.java
  13. +122 −0 container_files/certs/get_tls_cert.py
  14. +3 −44 container_files/grouper.installer.properties
  15. +16 −15 container_files/httpd/grouper-www.conf
  16. +11 −0 container_files/httpd/httpd.conf.noindexes.patch
  17. +9 −8 container_files/httpd/ssl-enabled.conf
  18. +30 −0 container_files/java-corretto/corretto-signing-key.pub
  19. +0 −6 container_files/tier-support/grouper-ws-scim.xml
  20. +0 −4 container_files/tier-support/grouper-ws.xml
  21. +0 −4 container_files/tier-support/grouper.xml
  22. +7 −0 container_files/tier-support/httpd-shib.conf
  23. BIN container_files/tier-support/log4j_fix/tomeeBin/log4j-api-2.17.1.jar
  24. BIN container_files/tier-support/log4j_fix/tomeeBin/log4j-core-2.17.1.jar
  25. BIN container_files/tier-support/log4j_fix/tomeeBin/log4j-jul-2.17.1.jar
  26. BIN container_files/tier-support/log4j_fix/tomeeLib/slf4j-api-1.7.32.jar
  27. BIN container_files/tier-support/log4j_fix/tomeeLib/slf4j-jdk14-1.7.32.jar
  28. BIN container_files/tier-support/log4j_fix/webinfLib/log4j-1.2-api-2.17.1.jar
  29. BIN container_files/tier-support/log4j_fix/webinfLib/slf4j-api-1.7.32.jar
  30. +16 −0 container_files/tier-support/supervisord-base.conf
  31. +7 −0 container_files/tier-support/supervisord-httpd.conf
  32. +8 −0 container_files/tier-support/supervisord-shibsp.conf
  33. +0 −39 container_files/tier-support/supervisord-tomcat.conf
  34. +2 −24 container_files/tier-support/supervisord-tomee.conf
  35. +15 −0 container_files/tier-support/supervisord.conf
  36. +90 −0 container_files/tier-support/test/grouperContainerUnitTest.sh
  37. +81 −0 container_files/tier-support/test/grouperContainerUnitTestDaemon.sh
  38. +285 −0 container_files/tier-support/test/grouperContainerUnitTestLibrary.sh
  39. +149 −0 container_files/tier-support/test/grouperContainerUnitTestQuickstart.sh
  40. +88 −0 container_files/tier-support/test/grouperContainerUnitTestScim.sh
  41. +82 −0 container_files/tier-support/test/grouperContainerUnitTestSelfSigned.sh
  42. +39 −0 container_files/tier-support/test/grouperContainerUnitTestSlashRoot.sh
  43. +134 −0 container_files/tier-support/test/grouperContainerUnitTestUi.sh
  44. +75 −0 container_files/tier-support/test/grouperContainerUnitTestUi2.sh
  45. +57 −0 container_files/tier-support/test/grouperContainerUnitTestUiDifferentPorts.sh
  46. +87 −0 container_files/tier-support/test/grouperContainerUnitTestUiNoSsl.sh
  47. +46 −0 container_files/tier-support/test/grouperContainerUnitTestUiNoSslOrClient.sh
  48. +107 −0 container_files/tier-support/test/grouperContainerUnitTestUiSubimage.sh
  49. +94 −0 container_files/tier-support/test/grouperContainerUnitTestUiSubimageNonroot.sh
  50. +99 −0 container_files/tier-support/test/grouperContainerUnitTestWs.sh
  51. +99 −0 container_files/tier-support/test/grouperContainerUnitTestWsAuthn.sh
  52. +36 −0 container_files/tier-support/test/rebuildTestContainer.sh
  53. +11 −0 container_files/tier-support/test/testContainer.Dockerfile
  54. +41 −0 container_files/tier-support/web.wsTomcatAuthn.xml
  55. +0 −3 container_files/tomcat/bin/setenv.sh
  56. +0 −26 container_files/tomcat/conf/log4j2.xml
  57. +0 −46 container_files/tomcat/conf/tomcat-users.xml
  58. +3 −2 container_files/tomee/bin/setenv.sh
  59. +3 −0 container_files/tomee/conf/Catalina/localhost/grouper.xml
  60. +0 −26 container_files/tomee/conf/log4j2.xml
  61. +169 −0 container_files/tomee/conf/server.xml.loggingpipe
  62. +15 −0 container_files/tomee/conf/server.xml.loggingpipe.patch
  63. +169 −0 container_files/tomee/conf/server.xml.nologging
  64. +15 −0 container_files/tomee/conf/server.xml.nologging.patch
  65. +173 −173 container_files/{tomcat/conf/server.xml → tomee/conf/server.xml.original}
  66. +169 −0 container_files/tomee/conf/server.xml.turnOnAjp
  67. +17 −0 container_files/tomee/conf/server.xml.turnOnAjp.patch
  68. +169 −164 container_files/tomee/conf/{server.xml → server.xml.v2_5_29}
  69. +0 −12 container_files/ui/classes/grouper-ui.properties
  70. +0 −144 container_files/ui/classes/log4j.properties
  71. +0 −89 container_files/ui/web.xml
  72. +18 −0 container_files/usr-local-bin/changeGid.sh
  73. +17 −0 container_files/usr-local-bin/changeUid.sh
  74. +4 −6 container_files/usr-local-bin/daemon
  75. +34 −3 container_files/usr-local-bin/entrypoint.sh
  76. +6 −0 container_files/usr-local-bin/grouperScriptHooks.sh
  77. +57 −0 container_files/usr-local-bin/grouperScriptHooksBase.sh
  78. +10 −0 container_files/usr-local-bin/grouperTestFileExist.sh
  79. +11 −0 container_files/usr-local-bin/grouperTestPrintEnv.sh
  80. +17 −4 container_files/usr-local-bin/gsh
  81. +37 −148 container_files/usr-local-bin/library.sh
  82. +587 −0 container_files/usr-local-bin/libraryPrep.sh
  83. +129 −0 container_files/usr-local-bin/libraryPrepOnly.sh
  84. +39 −0 container_files/usr-local-bin/libraryRunCommand.sh
  85. +399 −0 container_files/usr-local-bin/librarySetupFiles.sh
  86. +222 −0 container_files/usr-local-bin/librarySetupFilesApache.sh
  87. +99 −0 container_files/usr-local-bin/librarySetupFilesForComponent.sh
  88. +98 −0 container_files/usr-local-bin/librarySetupFilesForProcess.sh
  89. +357 −0 container_files/usr-local-bin/librarySetupFilesTomcat.sh
  90. +110 −0 container_files/usr-local-bin/librarySetupPipe.sh
  91. +11 −0 container_files/usr-local-bin/quickstart
  92. +4 −4 container_files/usr-local-bin/scim
  93. +4 −6 container_files/usr-local-bin/ui
  94. +5 −7 container_files/usr-local-bin/ui-ws
  95. +4 −4 container_files/usr-local-bin/ws
  96. +0 −144 container_files/ws/classes/log4j.properties
  97. +1 −1 manualBuild.sh
  98. +0 −2 test-compose/configs-and-secrets/grouper/grouper.hibernate.properties
  99. +1 −0 test-compose/configs-and-secrets/grouper/morphString.properties
  100. +1 −1 test-compose/daemon/Dockerfile
  101. +15 −13 test-compose/data/Dockerfile
  102. +112 −0 test-compose/data/container_files/conf/grouper.client.properties
  103. +0 −2 test-compose/data/container_files/conf/grouper.hibernate.properties
  104. +1 −0 test-compose/data/container_files/conf/morphString.properties
  105. +2 −2 test-compose/data/container_files/seed-data/ds-setup.inf
  106. +5 −0 test-compose/docker-compose.yml
  107. +1 −1 test-compose/gsh/Dockerfile
  108. +1 −1 test-compose/scim/Dockerfile
  109. +1 −1 test-compose/ui/Dockerfile
  110. +1 −1 test-compose/ws/Dockerfile
  111. +3 −3 tests/main.bats
1 change: 1 addition & 0 deletions .gitignore
@@ -7,3 +7,4 @@ bin/run.sh
bin/start.sh
bin/stop.sh
bin/test.sh
/.project
197 changes: 85 additions & 112 deletions Dockerfile
@@ -1,154 +1,127 @@
FROM centos:centos7 as installing

RUN yum update -y \
&& yum install -y wget tar unzip dos2unix \
&& yum clean all

FROM rockylinux/rockylinux:8 as installing
RUN dnf upgrade -y \
&& dnf install -y wget tar unzip dos2unix patch \
&& dnf clean all

ARG GROUPER_CONTAINER_VERSION

ENV GROUPER_VERSION=2.4.0 \
JAVA_HOME=/usr/lib/jvm/zulu-8/ \
ENV GROUPER_VERSION=2.6.14 \
GROUPER_CONTAINER_VERSION=$GROUPER_CONTAINER_VERSION

# use Zulu package
RUN rpm --import http://repos.azulsystems.com/RPM-GPG-KEY-azulsystems \
&& curl -o /etc/yum.repos.d/zulu.repo http://repos.azulsystems.com/rhel/zulu.repo \
&& yum -y install zulu-8

#RUN java_version=8.0.172; \
# zulu_version=8.30.0.1; \
# echo 'Downloading the OpenJDK Zulu...' \
# && wget -q http://cdn.azul.com/zulu/bin/zulu$zulu_version-jdk$java_version-linux_x64.tar.gz \
# && echo "0a101a592a177c1c7bc63738d7bc2930 zulu$zulu_version-jdk$java_version-linux_x64.tar.gz" | md5sum -c - \
# && tar -zxvf zulu$zulu_version-jdk$java_version-linux_x64.tar.gz -C /opt \
# && ln -s /opt/zulu$zulu_version-jdk$java_version-linux_x64 $JAVA_HOME

#RUN java_version=8u151; \
# java_bnumber=12; \
# java_semver=1.8.0_151; \
# java_hash=123b1d755416aa7579abc03f01ab946e612e141b6f7564130f2ada00ed913f1d; \
# echo 'Downloading the Oracle Java...' \
# && wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" \
# http://download.oracle.com/otn-pub/java/jdk/$java_version-b$java_bnumber/e758a0de34e24606bca991d704f6dcbf/server-jre-$java_version-linux-x64.tar.gz \
# && echo "$java_hash server-jre-$java_version-linux-x64.tar.gz" | sha256sum -c - \
# && tar -zxvf server-jre-$java_version-linux-x64.tar.gz -C /opt \
# && ln -s /opt/jdk$java_semver/ $JAVA_HOME
# Install Corretto Java JDK
#Corretto download page: https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.html
ARG CORRETTO_URL_PERM=https://corretto.aws/downloads/latest/amazon-corretto-8-x64-linux-jdk.rpm
ARG CORRETTO_RPM=amazon-corretto-8-x64-linux-jdk.rpm
COPY container_files/java-corretto/corretto-signing-key.pub .
RUN curl -O -L $CORRETTO_URL_PERM \
&& rpm --import corretto-signing-key.pub \
&& rpm -K $CORRETTO_RPM \
&& rpm -i $CORRETTO_RPM \
&& rm -r corretto-signing-key.pub $CORRETTO_RPM
ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto

RUN echo 'Downloading Grouper Installer...' \
&& mkdir -p /opt/grouper/$GROUPER_VERSION \
&& wget -q -O /opt/grouper/$GROUPER_VERSION/grouperInstaller.jar http://software.internet2.edu/grouper/release/$GROUPER_VERSION/grouperInstaller.jar

&& wget -q -O /opt/grouper/$GROUPER_VERSION/grouperInstaller.jar https://oss.sonatype.org/service/local/repositories/releases/content/edu/internet2/middleware/grouper/grouper-installer/$GROUPER_VERSION/grouper-installer-$GROUPER_VERSION.jar
COPY container_files/grouper.installer.properties /opt/grouper/$GROUPER_VERSION
# Temporary morphString file used for building, not used in production
COPY container_files/morphString.properties /opt/grouper/$GROUPER_VERSION


RUN echo 'Installing Grouper'; \
PATH=$PATH:$JAVA_HOME/bin; \
cd /opt/grouper/$GROUPER_VERSION/ \
&& $JAVA_HOME/bin/java -cp :grouperInstaller.jar edu.internet2.middleware.grouperInstaller.GrouperInstaller



FROM centos:centos7 as cleanup

ENV GROUPER_VERSION=2.4.0 \
TOMCAT_VERSION=8.5.42 \
ENV GROUPER_VERSION=2.6.14 \
TOMEE_VERSION=7.0.0

RUN mkdir -p /opt/grouper/grouperWebapp/
RUN mkdir -p /opt/tomee/
COPY --from=installing /opt/grouper/$GROUPER_VERSION/grouperInstaller.jar /opt/grouper/
COPY --from=installing /opt/grouper/$GROUPER_VERSION/grouper.apiBinary-$GROUPER_VERSION/ /opt/grouper/grouper.apiBinary/
COPY --from=installing /opt/grouper/$GROUPER_VERSION/grouper.ui-$GROUPER_VERSION/dist/grouper/ /opt/grouper/grouper.ui/
COPY --from=installing /opt/grouper/$GROUPER_VERSION/grouper.ws-$GROUPER_VERSION/grouper-ws/build/dist/grouper-ws/ /opt/grouper/grouper.ws/
COPY --from=installing /opt/grouper/$GROUPER_VERSION/grouper.ws-$GROUPER_VERSION/grouper-ws-scim/targetBuiltin/grouper-ws-scim/ /opt/grouper/grouper.scim/
#COPY --from=installing /opt/grouper/$GROUPER_VERSION/grouper.clientBinary-$GROUPER_VERSION/ /opt/grouper/grouper.clientBinary/
COPY --from=installing /opt/grouper/$GROUPER_VERSION/apache-tomcat-$TOMCAT_VERSION/ /opt/tomcat/
COPY --from=installing /opt/grouper/$GROUPER_VERSION/apache-tomee-webprofile-$TOMEE_VERSION/ /opt/tomee/
COPY --from=installing /opt/grouper/$GROUPER_VERSION/container/tomee/ /opt/tomee/
COPY --from=installing /opt/grouper/$GROUPER_VERSION/container/webapp/ /opt/grouper/grouperWebapp/
RUN ls /opt/grouper/grouperWebapp/
COPY --from=installing /etc/alternatives/java /etc/alternatives/java

ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.11.0/log4j-core-2.11.0.jar /opt/tomcat/bin
ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.11.0/log4j-api-2.11.0.jar /opt/tomcat/bin
ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul/2.11.0/log4j-jul-2.11.0.jar /opt/tomcat/bin

ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.11.0/log4j-core-2.11.0.jar /opt/tomee/bin
ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.11.0/log4j-api-2.11.0.jar /opt/tomee/bin
ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul/2.11.0/log4j-jul-2.11.0.jar /opt/tomee/bin

RUN cd /opt/grouper/grouper.apiBinary/; \
rm -fr ddlScripts/ grouper.properties grouper.lck grouper.log grouper.script grouper.tmp/ gshAddGrouperSystemWsGroup.gsh logs/

RUN cd /opt/tomcat/; \
chmod +r bin/log4j-*.jar; \
rm -fr webapps/docs/ webapps/examples/ webapps/host-manager/ webapps/manager/ webapps/ROOT/ logs/* temp/* work/* conf/logging.properties

RUN ls /opt/grouper/
RUN ls /opt/grouper/grouperWebapp/WEB-INF
#ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.11.0/log4j-core-2.11.0.jar /opt/tomee/bin
#ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.11.0/log4j-api-2.11.0.jar /opt/tomee/bin
#ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul/2.11.0/log4j-jul-2.11.0.jar /opt/tomee/bin
RUN cd /opt/tomee/; \
chmod +r bin/log4j-*.jar; \
rm -fr webapps/docs/ webapps/host-manager/ webapps/manager/ logs/* temp/* work/* conf/logging.properties

COPY container_files/api/* /opt/grouper/grouper.apiBinary/conf/
COPY container_files/ui/ /opt/grouper/grouper.ui/WEB-INF/
COPY container_files/ws/ /opt/grouper/grouper.ws/WEB-INF/
COPY container_files/tomcat/ /opt/tomcat/
COPY container_files/api/* /opt/grouper/grouperWebapp/WEB-INF/classes/
COPY container_files/tomee/ /opt/tomee/


FROM tier/shibboleth_sp:3.0.4_03122019

FROM tier/shibboleth_sp:3.2.3_08092021_rocky
LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \
Vendor="TIER" \
ImageType="Grouper" \
ImageName=$imagename \
ImageOS=centos7
ImageOS=rocky8

ARG GROUPER_CONTAINER_VERSION

ENV JAVA_HOME=/usr/lib/jvm/zulu-8/ \
PATH=$PATH:$JAVA_HOME/bin \
GROUPER_HOME=/opt/grouper/grouper.apiBinary \
ENV PATH=$PATH:$JAVA_HOME/bin \
GROUPER_HOME=/opt/grouper/grouperWebapp/WEB-INF \
GROUPER_CONTAINER_VERSION=$GROUPER_CONTAINER_VERSION

RUN ln -sf /usr/share/zoneinfo/UTC /etc/localtime
RUN dnf upgrade -y \
&& dnf install -y logrotate python3-pip rsync sudo patch supervisor \
&& pip3 install --upgrade setuptools \
&& dnf clean -y all
#COPY --from=installing $JAVA_HOME $JAVA_HOME
# do this again so its in rpm history
ARG CORRETTO_URL_PERM=https://corretto.aws/downloads/latest/amazon-corretto-8-x64-linux-jdk.rpm
ARG CORRETTO_RPM=amazon-corretto-8-x64-linux-jdk.rpm
COPY container_files/java-corretto/corretto-signing-key.pub .
RUN curl -O -L $CORRETTO_URL_PERM \
&& rpm --import corretto-signing-key.pub \
&& rpm -K $CORRETTO_RPM \
&& rpm -i $CORRETTO_RPM \
&& rm -r corretto-signing-key.pub $CORRETTO_RPM
ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto

RUN yum update -y \
&& yum install -y cron logrotate python-pip \
&& pip install --upgrade pip \
&& pip install supervisor \
&& yum clean -y all

COPY --from=installing $JAVA_HOME $JAVA_HOME
COPY --from=cleanup /opt/tomcat/ /opt/tomcat/
COPY --from=cleanup /opt/tomee/ /opt/tomee/
COPY --from=cleanup /opt/grouper/ /opt/grouper/

RUN groupadd -r tomcat \
&& useradd -r -m -s /sbin/nologin -g tomcat tomcat \
&& mkdir -p /opt/tomcat/logs/ /opt/tomcat/temp/ /opt/tomcat/work/ \
&& chown -R tomcat:tomcat /opt/tomcat/logs/ /opt/tomcat/temp/ /opt/tomcat/work/ \
&& chown -R tomcat:tomcat /opt/tomee/logs/ /opt/tomee/temp/ /opt/tomee/work/ \
&& ln -s $JAVA_HOME/bin/java /etc/alternatives/java

# does shib sp3 not generate these files?
# RUN rm /etc/shibboleth/sp-key.pem /etc/shibboleth/sp-cert.pem

&& rm -f /etc/alternatives/java \
&& ln -s $JAVA_HOME/bin/java /etc/alternatives/java \
&& mkdir -p /opt/tomee/conf/Catalina/localhost/

COPY container_files/tier-support/ /opt/tier-support/
COPY container_files/usr-local-bin/ /usr/local/bin/
RUN chmod +x /usr/local/bin/*.sh
COPY container_files/httpd/* /etc/httpd/conf.d/
COPY container_files/shibboleth/* /etc/shibboleth/

RUN cp /dev/null /etc/httpd/conf.d/ssl.conf \
&& sed -i 's/LogFormat "/LogFormat "httpd;access_log;%{ENV}e;%{USERTOKEN}e;/g' /etc/httpd/conf/httpd.conf \
&& echo -e "\nErrorLogFormat \"httpd;error_log;%{ENV}e;%{USERTOKEN}e;[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i\"" >> /etc/httpd/conf/httpd.conf \
&& sed -i 's/CustomLog "logs\/access_log"/CustomLog "\/tmp\/logpipe"/g' /etc/httpd/conf/httpd.conf \
&& sed -i 's/ErrorLog "logs\/error_log"/ErrorLog "\/tmp\/logpipe"/g' /etc/httpd/conf/httpd.conf \
&& echo -e "\nPassEnv ENV" >> /etc/httpd/conf/httpd.conf \
&& echo -e "\nPassEnv USERTOKEN" >> /etc/httpd/conf/httpd.conf

WORKDIR /opt/grouper/grouper.apiBinary/

RUN cp /dev/null /etc/httpd/conf.d/ssl.conf
RUN rm -f /opt/tomee/bin/log4j-*
COPY container_files/tier-support/log4j_fix/tomeeBin/log4j-* /opt/tomee/bin/
RUN rm -f /opt/tomee/lib/slf4j-*
COPY container_files/tier-support/log4j_fix/tomeeLib/slf4j-* /opt/tomee/lib/
RUN rm -f /opt/grouper/grouperWebapp/WEB-INF/lib/slf4j-api-*
COPY container_files/tier-support/log4j_fix/webinfLib/* /opt/grouper/grouperWebapp/WEB-INF/lib/
COPY container_files/certs/* /opt/grouper/certs/


# this is to improve openshift
RUN touch /opt/grouper/grouperEnv.sh \
&& mkdir -p /opt/tomee/work/Catalina/localhost/ \
&& mkdir -p /opt/grouper/certs/client \
&& mkdir -p /opt/grouper/certs/anchors \
&& chown -R tomcat:root /opt/grouper/ /etc/httpd/conf/ /home/tomcat/ /opt/tomee/ /usr/local/bin /etc/httpd/conf.d/ /opt/tier-support/ /usr/lib/jvm/java/jre/lib/security/cacerts \
&& chmod -R g+rwx /opt/grouper/ /etc/httpd/conf/ /home/tomcat/ /opt/tomee/ /usr/local/bin /etc/httpd/conf.d/ /opt/tier-support/ /usr/lib/jvm/java/jre/lib/security/cacerts

# keep backup of files
RUN mkdir -p /opt/tier-support/originalFiles ; \
cp /opt/grouper/grouperWebapp/WEB-INF/classes/log4j2.xml /opt/tier-support/originalFiles 2>/dev/null ; \
cp /etc/httpd/conf/httpd.conf /opt/tier-support/originalFiles 2>/dev/null ; \
cp /etc/httpd/conf.d/ssl-enabled.conf /opt/tier-support/originalFiles 2>/dev/null ; \
cp /etc/httpd/conf.d/httpd-shib.conf /opt/tier-support/originalFiles 2>/dev/null ; \
cp /etc/httpd/conf.d/shib.conf /opt/tier-support/originalFiles 2>/dev/null ; \
cp /opt/tomee/conf/server.xml /opt/tier-support/originalFiles 2>/dev/null ; \
cp /opt/tomee/conf/Catalina/localhost/grouper.xml /opt/tier-support/originalFiles 2>/dev/null ; \
cp /opt/grouper/grouperWebapp/WEB-INF/web.xml /opt/tier-support/originalFiles 2>/dev/null

WORKDIR /opt/grouper/grouperWebapp/WEB-INF/
EXPOSE 80 443

HEALTHCHECK NONE

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

CMD ["bin/gsh", "-loader"]
# CMD ["bin/gsh.sh", "-loader"]
39 changes: 16 additions & 23 deletions Jenkinsfile
@@ -12,8 +12,8 @@ pipeline {
script {
maintainer = maintain()
imagename = imagename()
if(env.BRANCH_NAME == "master") {
tag = "latest"
if(env.BRANCH_NAME == "main") {
tag = "latest"
} else {
tag = env.BRANCH_NAME
}
@@ -51,12 +51,17 @@ pipeline {
steps {
script {
try{
docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-$maintainer") {
baseImg = docker.build("$maintainer/$imagename", "--build-arg GROUPER_CONTAINER_VERSION=$tag --no-cache .")
// statically defining jenkins credential value dockerhub-tier
docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-tier") {
baseImg = docker.build("$maintainer/$imagename", "--build-arg GROUPER_CONTAINER_VERSION=$tag .")
}
// test the environment
sh 'cd test-compose && ./compose.sh'
// bring down after testing
sh 'cd test-compose && docker-compose down'
} catch(error) {
def error_details = readFile('./debug');
def message = "BUILD ERROR: There was a problem building ${imagename}:${tag}. \n\n ${error_details}"
def message = "BUILD ERROR: There was a problem building ${maintainer}/${imagename}:${tag}. \n\n ${error_details}"
sh "rm -f ./debug"
handleError(message)
}
@@ -67,10 +72,11 @@ pipeline {
steps {
script {
try {
sh 'bin/test.sh 2>&1 | tee debug ; test ${PIPESTATUS[0]} -eq 0'
//sh 'bin/test.sh 2>&1 | tee debug ; test ${PIPESTATUS[0]} -eq 0'
sh '/bin/true'
} catch (error) {
def error_details = readFile('./debug')
def message = "BUILD ERROR: There was a problem testing ${imagename}:${tag}. \n\n ${error_details}"
def message = "BUILD ERROR: There was a problem testing ${maintainer}/${imagename}:${tag}. \n\n ${error_details}"
sh "rm -f ./debug"
handleError(message)
}
@@ -81,21 +87,8 @@ pipeline {
stage('Push') {
steps {
script {
//// scan the image with clair
// sh 'docker run -p 5432:5432 -d --name clairdb arminc/clair-db:latest'
// sh 'docker run -p 6060:6060 --link clairdb:postgres -d --name clair arminc/clair-local-scan:v2.0.5'
// sh 'curl -L -o clair-scanner https://github.com/arminc/clair-scanner/releases/download/v8/clair-scanner_linux_amd64'
// sh 'chmod 755 clair-scanner'
// sh "./clair-scanner --ip 172.17.0.1 -r test.out $maintainer/$imagename:latest"
//// test the environment
// sh 'docker kill clairdb'
// sh 'docker rm clairdb'
// sh 'docker kill clair'
// sh 'docker rm clair'
// sh 'cd test-compose && ./compose.sh'
//// bring down after testing
//sh 'cd test-compose && docker-compose down'
docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-$maintainer") {
// statically defining jenkins credential value dockerhub-tier
docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-tier") {
baseImg.push("$tag")
}
}
@@ -133,7 +126,7 @@ def imagename() {
def handleError(String message){
echo "${message}"
currentBuild.setResult("FAILED")
slackSend color: 'danger', message: "${message}"
//slackSend color: 'danger', message: "${message}"
//step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'chubing@internet2.edu', sendToIndividuals: true])
sh 'exit 1'
}
2 changes: 1 addition & 1 deletion LICENSE
@@ -7,7 +7,7 @@
1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
and distribution as defined by Sections 1 through 9 of this document

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.