Skip to content

Commit

Permalink
refactor repo files
Browse files Browse the repository at this point in the history
  • Loading branch information
pcaskey committed Nov 21, 2018
1 parent b2e5cf0 commit 035eaaa
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ RUN del C:\%JAVA_INSTALL_FILENAME%
##install Tomcat
COPY config.ini c:\config.ini
COPY container_files/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 SHA512).Hash.ToLower() -eq ` \
'a03c507179cddb8ec6d35572fa81522c3472df689e34718daff8faa91bcb6af397a5f0d0d4c929add3e86d0957275c0d402ea96c491c50f639ec6371ba146d43') ` \
Expand All @@ -61,9 +61,9 @@ RUN powershell If ((Get-FileHash C:\apache-tomcat-%TOMCAT_VERSION%.exe -Algorith
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 container_files/keystore.jks c:\\sslcert\\keystore.jks
#copy temp tomcat config file (listening on 443, cert at c:\sslcert\keystore.jks
COPY server.xml c:\\Tomcat\\conf\\server.xml
COPY container_files/server.xml c:\\Tomcat\\conf\\server.xml
#cleanup tomcat install
RUN rmdir /S /Q c:\Tomcat\webapps\docs && rmdir /S /Q c:\Tomcat\webapps\manager && del /F /Q c:\tomcat\webapps\ROOT\*.* && del /F /Q c:\tomcat\webapps\ROOT\WEB-INF\*.* && rmdir c:\tomcat\webapps\ROOT\WEB-INF
Expand All @@ -80,11 +80,11 @@ RUN mklink c:\Tomcat\webapps\idp.war c:\opt\shibboleth-idp\war\idp.war
#copy TIER beacon script
RUN mkdir c:\util
RUN mkdir c:\opt\certs
COPY sendtierbeacon.ps1 c:\\util
COPY container_files/sendtierbeacon.ps1 c:\\util
#schedule script to run (at random time)
#RUN powershell ($tm=((Get-Random -Minimum 0 -Maximum 4) -as [string]) + ":" + ((Get-Random -Minimum 0 -Maximum 60) -as [string]) ; start-process -filepath schtasks -passthru -wait -argumentlist '/create','/tn','\"Send TIER Beacon\"','/tr','c:\util\sendtierbeacon.ps1','/sc','DAILY','/st',"$tm"
#The line above is triggering an apprent bug in docker or windows core (essentially invalid XML), the 2 lines below are the workaround
COPY TIER_Beacon_Task.xml c:\TIER_Beacon_Task.xml
COPY container_files/TIER_Beacon_Task.xml c:\TIER_Beacon_Task.xml
RUN powershell schtasks /Create /XML c:\TIER_Beacon_Task.xml /TN 'TIER Beacon' ; $tm=((Get-Random -Minimum 0 -Maximum 4) -as [string]).padleft(2,'0') + ':' + ((Get-Random -Minimum 0 -Maximum 60) -as [string]).padleft(2,'0') ; schtasks /Change /TN 'TIER Beacon' /ST $tm
RUN del c:\TIER_Beacon_Task.xml

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 035eaaa

Please sign in to comment.