Skip to content

Commit

Permalink
Merge pull request #15 from docker/oracle-jdk
Browse files Browse the repository at this point in the history
Oracle jdk
  • Loading branch information
Jim Van Fleet committed Aug 3, 2016
2 parents 2064b15 + 8faa995 commit e2c093a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,19 @@ LABEL ImageName=$imagename
LABEL ImageOS=centos7
LABEL Version=$VERSION

ENV JAVA_VERSION 8u101
ENV BUILD_VERSION b13

RUN 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 /usr/java/latest/bin/java 200000 && \
alternatives --install /usr/bin/javaws javaws /usr/java/latest/bin/javaws 200000 && \
alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 200000

RUN yum -y install \
apr-devel \
httpd \
java-1.8.0-openjdk-headless \
krb5-workstation \
mod_ssl \
openssl-devel \
Expand All @@ -30,6 +39,8 @@ RUN yum -y install \

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

RUN mkdir -p /tmp/shibboleth && cd /tmp/shibboleth && \
wget -q https://shibboleth.net/downloads/PGP_KEYS \
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ node {
echo "Building ${maintainer}:${tag} for ${maintainer}"
}

sh 'bin/build.sh'
sh 'bin/rebuild.sh'

stage 'Tests'

Expand Down
9 changes: 5 additions & 4 deletions tests/shibboleth-idp.bats
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

load ../common

setup() {
./bin/rebuild.sh
}

@test "Creates non-root Shib IDP home" {
result="$(docker run -i $maintainer/$imagename ls /opt/shibboleth/current/bin/)"
[ "$result" != '' ]
Expand All @@ -21,6 +17,11 @@ setup() {
[ "$status" -eq 0 ]
}

@test "exports JAVA_HOME" {
result="$(docker run -i $maintainer/$imagename env | grep JAVA_HOME)"
[ "$result" != "" ]
}

@test "Defers configuration via ONBUILD" {
run grep ONBUILD Dockerfile
[ "$status" -eq 0 ]
Expand Down

0 comments on commit e2c093a

Please sign in to comment.