From 1b5bf867caf20b9ddbd18db3df29e5ce801c5565 Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Tue, 6 Nov 2018 17:00:35 +0000 Subject: [PATCH] IdP 3.4.1 and bump java,tomcat --- Dockerfile | 18 +++++++++++------- config.ini | 3 ++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 43591ba..c00b9bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,14 +6,14 @@ 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 ) @@ -21,7 +21,7 @@ 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% @@ -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 @@ -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 diff --git a/config.ini b/config.ini index 81d9395..acd684a 100644 --- a/config.ini +++ b/config.ini @@ -1 +1,2 @@ -JavaHome=c:\zulujava\zulu-8\ \ No newline at end of file +JavaHome=c:/zulujava/zulu-8/ +