Skip to content

Commit

Permalink
Installing Java
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Van Fleet committed Nov 8, 2016
1 parent 7be79fd commit 71a0feb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
14 changes: 3 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM tier/grouper
FROM tier/grouper:move-from-openjdk

ARG maintainer=my
ARG imagename=grouper
Expand All @@ -7,17 +7,9 @@ ARG version=2.3.0
LABEL Version=$version
ENV VERSION=$version
ENV TOMCAT_VERSION="6.0.35"
ENV JAVA_HOME=/usr/java/latest

ADD ./container_files /opt/
COPY conf/grouper.conf /etc/httpd/conf.d/grouper.conf
COPY conf/grouper.hibernate.properties /opt/etc
RUN rm /opt/grouper/2.3.0/grouper.apiBinary-2.3.0/conf/grouper.hibernate.properties && \
ln -s /opt/etc/grouper.hibernate.properties /opt/grouper/2.3.0/grouper.apiBinary-2.3.0/conf/grouper.hibernate.properties && \
rm /opt/grouper/2.3.0/grouper.ws-2.3.0/grouper-ws/build/dist/grouper-ws/WEB-INF/classes/grouper.hibernate.properties && \
ln -s /opt/etc/grouper.hibernate.properties /opt/grouper/2.3.0/grouper.ws-2.3.0/grouper-ws/build/dist/grouper-ws/WEB-INF/classes/grouper.hibernate.properties && \
rm /opt/grouper/2.3.0/grouper.ui-2.3.0/dist/grouper/WEB-INF/classes/grouper.hibernate.properties && \
ln -s /opt/etc/grouper.hibernate.properties /opt/grouper/2.3.0/grouper.ui-2.3.0/dist/grouper/WEB-INF/classes/grouper.hibernate.properties && \
/opt/autoexec/bin/onbuild.sh
RUN yum remove -y java-1.8.0-openjdk java-1.8.0-openjdk-devel && /opt/bin/install_oracle_jdk.sh

VOLUME /opt/grouper/$version/apache-tomcat-$TOMCAT_VERSION/logs
VOLUME /etc/httpd/logs
16 changes: 16 additions & 0 deletions additional_container_files/bin/install_oracle_jdk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/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=7u79
BUILD_VERSION=b15
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-7-linux-x64.rpm && \
yum -y install /tmp/jdk-7-linux-x64.rpm && \
rm -f /tmp/jdk-7-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

0 comments on commit 71a0feb

Please sign in to comment.