Skip to content

Commit

Permalink
update versions
Browse files Browse the repository at this point in the history
  • Loading branch information
pcaskey committed May 17, 2018
1 parent 985803b commit 4afb398
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM microsoft/windowsservercore:latest

#settings
ENV JAVA_VERSION=8u161
ENV JAVA_BUNDLE_ID=230542_2f38c3b165be4555a1fa6e98c45e0808
ENV JAVA_INSTALL_FOLDER=jre1.8.0_161
ENV JAVA_VERSION=8u171
ENV JAVA_BUNDLE_ID=233172_512cd62ec5174c3487ac17c61aaa89e8
ENV JAVA_INSTALL_FOLDER=jre1.8.0_171
ENV JAVA_OPTS=-XX:+UseG1GC\ -Xmx2000m
ENV TOMCAT_MAJOR_VERSION=8
ENV TOMCAT_VERSION=8.0.47
ENV TOMCAT_VERSION=8.5.31
ENV CATALINA_HOME=c:\\Tomcat
ENV IDP_VERSION=3.3.2.0
ENV IDP_VERSION=3.3.3
###
ENV JAVA_INSTALL_CLI_STRING=INSTALLDIR=c:\\Java\\$JAVA_INSTALL_FOLDER
ENV JAVA_HOME=c:\\Java\\$JAVA_INSTALL_FOLDER
Expand All @@ -17,7 +17,7 @@ ENV SHIB_INSTALL_FILE=C:\\shibboleth-identity-provider-$IDP_VERSION-x64.msi

##install Java
RUN powershell (new-object System.Net.WebClient).Downloadfile('http://javadl.oracle.com/webapps/download/AutoDL?BundleId=%JAVA_BUNDLE_ID%', 'C:\jre-%JAVA_VERSION%-windows-x64.exe')
RUN powershell If ((Get-FileHash C:\jre-%JAVA_VERSION%-windows-x64.exe).Hash.ToLower() -eq '4378d712c510930d066bfa256b24e07dfea5ed31aa514afb7c7dd72fcce9bb68') { ` \
RUN powershell If ((Get-FileHash C:\jre-%JAVA_VERSION%-windows-x64.exe).Hash.ToLower() -eq 'd5256b3d1a6da959ea98ea2a2be3a05a7df9d1a5cd75db3930f935ab71ce43b8') { ` \
start-process -filepath C:\jre-%JAVA_VERSION%-windows-x64.exe -passthru -wait -argumentlist '/s',%JAVA_INSTALL_CLI_STRING%,'/L','installj64.log' ` \
} Else { throw 'bad hash comparison on Java download' }
RUN del C:\jre-%JAVA_VERSION%-windows-x64.exe
Expand All @@ -39,7 +39,7 @@ RUN del c:\jce_policy-8.zip

##install Tomcat
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 '51d81b52d595a4d575bbe89ef4fa137e9367a080') { ` \
RUN powershell If ((Get-FileHash C:\apache-tomcat-%TOMCAT_VERSION%.exe -Algorithm SHA1).Hash.ToLower() -eq '7e3a5bf336765a544ae38e2ad0d709edc01bb43f') { ` \
start-process -filepath C:\apache-tomcat-%TOMCAT_VERSION%.exe -passthru -wait -argumentlist "/S,/D=C:\Tomcat" ` \
} Else { throw 'bad hash comparison on Tomcat download' }
RUN del C:\apache-tomcat-%TOMCAT_VERSION%.exe
Expand All @@ -53,7 +53,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 'fca024981da85a77c8389563d584230593f5d399') { ` \
RUN powershell If ((Get-FileHash C:\shibboleth-identity-provider-%IDP_VERSION%-x64.msi -Algorithm SHA1).Hash.ToLower() -eq 'fc42e5b8d9484092ac5210e827f07cb3ae6928bd') { ` \
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 Expand Up @@ -138,21 +138,23 @@ ADD $SHBMD c:\\opt\\shibboleth-idp\\metadata
#
###############################################################################

# remove existing files from the installer so that secrets can propagate
RUN del c:\opt\shibboleth-idp\conf\idp.properties
RUN del c:\opt\shibboleth-idp\conf\ldap.properties
RUN del c:\opt\shibboleth-idp\conf\relying-party.xml
RUN del c:\opt\shibboleth-idp\conf\attribute-filter.xml
RUN del c:\opt\shibboleth-idp\conf\attribute-resolver.xml
RUN del c:\opt\shibboleth-idp\conf\metadata-providers.xml
RUN del c:\opt\shibboleth-idp\credentials\idp-signing.key
RUN del c:\opt\shibboleth-idp\credentials\idp-signing.crt
RUN del c:\opt\shibboleth-idp\credentials\idp-encryption.key
RUN del c:\opt\shibboleth-idp\credentials\idp-encryption.crt
RUN del c:\opt\shibboleth-idp\credentials\sealer.jks
RUN del c:\opt\shibboleth-idp\credentials\sealer.kver


# remove existing files from the installer so that secrets can propagate (UNCOMMENT if you are using secrets)
#RUN del c:\opt\shibboleth-idp\conf\idp.properties
#RUN del c:\opt\shibboleth-idp\conf\ldap.properties
#RUN del c:\opt\shibboleth-idp\conf\relying-party.xml
#RUN del c:\opt\shibboleth-idp\conf\attribute-filter.xml
#RUN del c:\opt\shibboleth-idp\conf\attribute-resolver.xml
#RUN del c:\opt\shibboleth-idp\conf\metadata-providers.xml
#RUN del c:\opt\shibboleth-idp\credentials\idp-signing.key
#RUN del c:\opt\shibboleth-idp\credentials\idp-signing.crt
#RUN del c:\opt\shibboleth-idp\credentials\idp-encryption.key
#RUN del c:\opt\shibboleth-idp\credentials\idp-encryption.crt
#RUN del c:\opt\shibboleth-idp\credentials\sealer.jks
#RUN del c:\opt\shibboleth-idp\credentials\sealer.kver

#establish a healthcheck command so that docker might know the container's true state
HEALTHCHECK --interval=2m --timeout=30s \
CMD powershell [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}; (new-object System.Net.WebClient).DownloadString("https://127.0.0.1/idp/status")

EXPOSE 443

Expand Down

0 comments on commit 4afb398

Please sign in to comment.