Skip to content

Oracle jdk #15

Merged
4 commits merged into from
Aug 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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