From ccae021d982da2629cb2fc453d1c84cd52943ecd Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Tue, 8 Nov 2016 09:13:01 -0500 Subject: [PATCH] First attempt at openjdk porting support --- Dockerfile | 12 +++++----- .../autoexec/onbuild/0_install_java.sh | 22 +++++++++++++++++++ 2 files changed, 27 insertions(+), 7 deletions(-) create mode 100755 container_files/autoexec/onbuild/0_install_java.sh diff --git a/Dockerfile b/Dockerfile index 35f18926..144c5af8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,7 @@ ENV WAIT_TIME=60 LABEL Build docker build --rm --tag $maintainer/$imagename . ADD container_files /opt +ONBUILD ADD additional_container_files /opt RUN mkdir -p /opt/grouper/$VERSION \ && mv /opt/etc/grouper.installer.properties /opt/grouper/$VERSION/. \ @@ -26,20 +27,17 @@ RUN mkdir -p /opt/grouper/$VERSION \ && yum -y update \ && yum -y install --setopt=tsflags=nodocs \ dos2unix \ - java-1.8.0-openjdk \ - java-1.8.0-openjdk-devel \ MariaDB-client \ mlocate \ && yum clean all - - + +RUN /opt/autoexec/bin/onbuild.sh # The installer creates a HSQL DB which we ignore later WORKDIR /opt/grouper/$version -RUN java -cp :grouperInstaller.jar edu.internet2.middleware.grouperInstaller.GrouperInstaller -VOLUME /opt/grouper/2.3.0/apache-tomcat-$TOMCAT_VERSION/logs +#VOLUME /opt/grouper/2.3.0/apache-tomcat-$TOMCAT_VERSION/logs EXPOSE 8080 8009 8005 -CMD ["/opt/bin/start.sh"] +CMD ["/opt/bin/start.sh"] \ No newline at end of file diff --git a/container_files/autoexec/onbuild/0_install_java.sh b/container_files/autoexec/onbuild/0_install_java.sh new file mode 100755 index 00000000..a0609edc --- /dev/null +++ b/container_files/autoexec/onbuild/0_install_java.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Override this file with a version with the following commented out in order to use Oracle JDK. + +# Uncomment all the following lines to download the JDK to your Shibboleth IDP image. By uncommenting these lines, you agree to the Oracle Binary Code License Agreement for Java SE (http://www.oracle.com/technetwork/java/javase/terms/license/index.html) + +#JAVA_VERSION=8u101 +#BUILD_VERSION b13 +#JAVA_HOME /usr/java/latest + +#wget -nv --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/$JAVA_VERSION-$BUILD_VERSION/jdk-$JAVA_VERSION-linux-x64.rpm" -O /tmp/jdk-8-linux-x64.rpm && \ +# yum -y install /tmp/jdk-8-linux-x64.rpm && \ +# rm -f /tmp/jdk-8-linux-x64.rpm && \ +# alternatives --install /usr/bin/java jar $JAVA_HOME/bin/java 200000 && \ +# alternatives --install /usr/bin/javaws javaws $JAVA_HOME/bin/javaws 200000 && \ +# alternatives --install /usr/bin/javac javac $JAVA_HOME/bin/javac 200000 + +yum -y install --setopt=tsflags=nodocs \ + java-1.8.0-openjdk \ + java-1.8.0-openjdk-devel + +cd /opt/grouper/$VERSION && java -cp :grouperInstaller.jar edu.internet2.middleware.grouperInstaller.GrouperInstaller \ No newline at end of file