Skip to content

Commit

Permalink
JCE can come in
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Van Fleet committed Mar 6, 2017
1 parent 2933be5 commit eb5b7a1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.rpm
*.zip
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ARG tierversion=17020
ARG tierbuild=$tierbuild

ARG oracle_jdk_rpm=jdk-8u121-linux-x64.rpm
ARG oracle_jce_zip=jce_policy-8.zip

ENV VERSION=$version
ENV TIERVERSION=$tierversion
Expand All @@ -36,18 +37,22 @@ RUN yum -y install \
openssl-devel \
wget \
&& yum -y clean all

ENV JAVA_HOME /usr/java/latest

COPY $oracle_jdk_rpm /tmp
COPY $oracle_jdk_rpm $oracle_jce_zip /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
alternatives --install /usr/bin/javac javac $JAVA_HOME/bin/javac 200000 && \
unzip -oj /tmp/$oracle_jce_zip UnlimitedJCEPolicyJDK8/local_policy.jar -d $JAVA_HOME/jre/lib/security/ && \
unzip -oj /tmp/$oracle_jce_zip UnlimitedJCEPolicyJDK8/US_export_policy.jar -d $JAVA_HOME/jre/lib/security/ && \
rm -f /tmp/$oracle_jce_zip && chmod -R 640 $JAVA_HOME/jre/lib/security/

ENV SHIB_RELDIR=http://shibboleth.net/downloads/identity-provider/$VERSION
ENV SHIB_PREFIX=shibboleth-identity-provider-$VERSION
ENV JAVA_HOME /usr/java/latest

RUN mkdir -p /tmp/shibboleth && cd /tmp/shibboleth && \
wget -q https://shibboleth.net/downloads/PGP_KEYS \
Expand All @@ -66,6 +71,7 @@ RUN mkdir -p /tmp/shibboleth && cd /tmp/shibboleth && \
# Cleanup
rm -rf /tmp/shibboleth


ENV CATALINA_HOME /usr/local/tomcat
ENV PATH $CATALINA_HOME/bin:$PATH
RUN mkdir -p "$CATALINA_HOME"
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ You should visit a page similar to [this one](http://www.oracle.com/technetwork/

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.

### Acquiring JCE

You should visit a page similar to [this one](http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html) at Oracle to download the Oracle Java Crypography Extension policy files.


## Building

```
docker build --build-arg ORACLE_JDK_RPM=jdk-8u121-linux-x64.rpm .
docker build --build-arg oracle_jdk_rpm=jdk-8u121-linux-x64.rpm \
--build-arg oracle_jce_zip=jce_policy-8.zip .
```

0 comments on commit eb5b7a1

Please sign in to comment.