From 2933be52c48953cb2443c04783420e8f2689a141 Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Mon, 6 Mar 2017 14:42:44 -0500 Subject: [PATCH] Can install Oracle JDK at buildtime --- .gitignore | 1 + Dockerfile | 11 +++++++++++ README.md | 19 +++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 .gitignore create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e7a9c13 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.rpm diff --git a/Dockerfile b/Dockerfile index e80caa3..3e8ffeb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,9 @@ ARG imagename=shibboleth_idp ARG version=3.3.0 ARG tierversion=17020 ARG tierbuild=$tierbuild + +ARG oracle_jdk_rpm=jdk-8u121-linux-x64.rpm + ENV VERSION=$version ENV TIERVERSION=$tierversion ENV TIERBUILD=$tierbuild @@ -34,6 +37,14 @@ RUN yum -y install \ wget \ && yum -y clean all +COPY $oracle_jdk_rpm /tmp + +RUN echo $oracle_jdk_rpm && yum -y install /tmp/$oracle_jdk_rpm && \ + rm -f /tmp/$oracle_jdk_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 + ENV SHIB_RELDIR=http://shibboleth.net/downloads/identity-provider/$VERSION ENV SHIB_PREFIX=shibboleth-identity-provider-$VERSION ENV JAVA_HOME /usr/java/latest diff --git a/README.md b/README.md new file mode 100644 index 0000000..16a20ac --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# Shibboleth IdP Standalone + +This version is designed for standalone, native Docker experience that should meet expectations for those who wish to operate Shibboleth IdP as a native Docker service. + +## Before You Build + +### Acquiring Oracle Java + + +You should visit a page similar to [this one](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) at Oracle to download the Oracle JDK. + +Select *the Linux x64 RPM* and agree to the Oracle Binary Code License Agreement. You'll ultimately need to mount this RPM in your invocation. + + +## Building + +``` +docker build --build-arg ORACLE_JDK_RPM=jdk-8u121-linux-x64.rpm . +``` \ No newline at end of file