Skip to content

Commit

Permalink
Merge pull request #5 from docker/181101_3.4.1
Browse files Browse the repository at this point in the history
IdP 3.4.1 and bump java,tomcat
  • Loading branch information
pcaskey authored Nov 6, 2018
2 parents 65c7235 + 1b5bf86 commit b70d3d0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
18 changes: 11 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ FROM microsoft/windowsservercore:latest
#ENV JAVA_INSTALL_FOLDER=jre1.8.0_171
ENV JAVA_OPTS='-Xmx3000m'
ENV TOMCAT_MAJOR_VERSION=9
ENV TOMCAT_VERSION=9.0.10
ENV TOMCAT_VERSION=9.0.12
ENV CATALINA_HOME=c:\\Tomcat
ENV IDP_VERSION=3.3.3.1
ENV IDP_VERSION=3.4.1
###
#ENV JAVA_INSTALL_CLI_STRING=INSTALLDIR=c:\\Java\\$JAVA_INSTALL_FOLDER
#below is for Zulu Java
ENV JAVA_HOME='c:\zulujava\zulu-8\'
ENV JAVA_INSTALL_FILENAME=zulu8.28.0.1-jdk8.0.163-win_x64.msi
ENV JAVA_INSTALL_FILENAME=zulu8.31.0.1-jdk8.0.181-win_x64.msi
#below is for Oracle Java
#ENV JAVA_HOME=c:\\Java\\$JAVA_INSTALL_FOLDER
RUN powershell [Environment]::SetEnvironmentVariable('JAVA_HOME', '%JAVA_HOME%', [System.EnvironmentVariableTarget]::Machine )
ENV SHIB_INSTALL_FILE=C:\\shibboleth-identity-provider-$IDP_VERSION-x64.msi
###install Zulu Java
RUN powershell (new-object System.Net.WebClient).Downloadfile('https://cdn.azul.com/zulu/bin/%JAVA_INSTALL_FILENAME%', 'C:\%JAVA_INSTALL_FILENAME%')
RUN powershell If ((Get-FileHash C:\%JAVA_INSTALL_FILENAME% -Algorithm SHA256).Hash.ToLower() -eq 'c5854c4c7c45f70715d57856b1fc7fea2e18ebdf31ad032dbd3bdc240af5a8a7') { ` \
RUN powershell If ((Get-FileHash C:\%JAVA_INSTALL_FILENAME% -Algorithm MD5).Hash.ToLower() -eq '21088dfd884ca42b999a1c2e890ac086') { ` \
start-process -filepath c:\windows\system32\msiexec.exe -passthru -wait -argumentlist '/i','C:\%JAVA_INSTALL_FILENAME%','APPLICATIONROOTDIRECTORY=c:\zulujava','/qn' ` \
} Else { throw 'bad hash comparison on Zulu Java download' }
RUN del C:\%JAVA_INSTALL_FILENAME%
Expand Down Expand Up @@ -49,13 +49,17 @@ RUN del C:\%JAVA_INSTALL_FILENAME%
# } Else { throw 'bad hash comparison on JCE download' }
#RUN del c:\jce_policy-8.zip
##install Tomcat
COPY config.ini c:\config.ini
RUN powershell (new-object System.Net.WebClient).Downloadfile('http://www.apache.org/dist/tomcat/tomcat-%TOMCAT_MAJOR_VERSION%/v%TOMCAT_VERSION%/bin/apache-tomcat-%TOMCAT_VERSION%.exe', 'C:\apache-tomcat-%TOMCAT_VERSION%.exe')
RUN powershell If ((Get-FileHash C:\apache-tomcat-%TOMCAT_VERSION%.exe -Algorithm SHA1).Hash.ToLower() -eq '9370f560ca2dab41d13300e16571f930cdedc76a') { ` \
start-process -filepath C:\apache-tomcat-%TOMCAT_VERSION%.exe -passthru -wait -argumentlist '/S','/C=c:\config.ini','/D=C:\Tomcat' ` \
RUN powershell If ((Get-FileHash C:\apache-tomcat-%TOMCAT_VERSION%.exe -Algorithm SHA512).Hash.ToLower() -eq ` \
'a03c507179cddb8ec6d35572fa81522c3472df689e34718daff8faa91bcb6af397a5f0d0d4c929add3e86d0957275c0d402ea96c491c50f639ec6371ba146d43') ` \
{ ` \
start-process -filepath C:\apache-tomcat-%TOMCAT_VERSION%.exe -passthru -wait -argumentlist '/S','/C=c:\config.ini','/D=c:\Tomcat' ` \
} Else { throw 'bad hash comparison on Tomcat download' }
RUN del C:\apache-tomcat-%TOMCAT_VERSION%.exe
#copy temp SSL cert for tomcat in c:\sslcert
COPY keystore.jks c:\\sslcert\\keystore.jks
#copy temp tomcat config file (listening on 443, cert at c:\sslcert\keystore.jks
Expand All @@ -65,7 +69,7 @@ RUN rmdir /S /Q c:\Tomcat\webapps\docs && rmdir /S /Q c:\Tomcat\webapps\manager
##install Shibb
RUN powershell (new-object System.Net.WebClient).Downloadfile('https://shibboleth.net/downloads/identity-provider/latest/shibboleth-identity-provider-%IDP_VERSION%-x64.msi', 'C:\shibboleth-identity-provider-%IDP_VERSION%-x64.msi')
RUN powershell If ((Get-FileHash C:\shibboleth-identity-provider-%IDP_VERSION%-x64.msi -Algorithm SHA1).Hash.ToLower() -eq '0268f22f49c1d136d8357597ac4a644c565d7f32') { ` \
RUN powershell If ((Get-FileHash C:\shibboleth-identity-provider-%IDP_VERSION%-x64.msi -Algorithm SHA1).Hash.ToLower() -eq 'cdb716c6b50de9862697e34ce1f69d7b563b802b') { ` \
start-process -filepath c:\windows\system32\msiexec.exe -passthru -wait -argumentlist '/i','C:\shibboleth-identity-provider-%IDP_VERSION%-x64.msi','/qn','INSTALLDIR=c:\opt\shibboleth-idp','NO_FIREWALL_EXCEPTION=true','DNSNAME=shibboleth.example.org','IDP_SCOPE=example.org' ` \
} Else { throw 'bad hash comparison on IdP download' }
RUN del C:\shibboleth-identity-provider-%IDP_VERSION%-x64.msi
Expand Down
3 changes: 2 additions & 1 deletion config.ini
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
JavaHome=c:\zulujava\zulu-8\
JavaHome=c:/zulujava/zulu-8/

0 comments on commit b70d3d0

Please sign in to comment.