diff --git a/Dockerfile b/Dockerfile index c00b9bf..ba139d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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') ` \ @@ -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 @@ -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 diff --git a/TIER_Beacon_Task.xml b/container_files/TIER_Beacon_Task.xml similarity index 100% rename from TIER_Beacon_Task.xml rename to container_files/TIER_Beacon_Task.xml diff --git a/config.ini b/container_files/config.ini similarity index 100% rename from config.ini rename to container_files/config.ini diff --git a/keystore.jks b/container_files/keystore.jks similarity index 100% rename from keystore.jks rename to container_files/keystore.jks diff --git a/sendtierbeacon.ps1 b/container_files/sendtierbeacon.ps1 similarity index 100% rename from sendtierbeacon.ps1 rename to container_files/sendtierbeacon.ps1 diff --git a/server.xml b/container_files/server.xml similarity index 100% rename from server.xml rename to container_files/server.xml