FROM tier/shib-idp-windows:latest

#params for supplying your IdP config to your container (can be overridden at build-time using build-args)
ARG TOMCFG=config\\tomcat
ARG TOMLOG=logs\\tomcat
ARG TOMCERT=credentials\\tomcat
ARG TOMWWWROOT=wwwroot
ARG SHBCFG=config\\shib-idp\\conf
ARG SHBCREDS=credentials\\shib-idp
ARG SHBVIEWS=config\\shib-idp\\views
ARG SHBEDWAPP=config\\shib-idp\\edit-webapp
ARG SHBMSGS=config\\shib-idp\\messages
ARG SHBMD=config\\shib-idp\\metadata
ARG SHBLOG=logs\\shib-idp

ADD $TOMCFG c:\\Tomcat\\conf
ADD $TOMCERT c:\\opt\\certs
ADD $TOMWWWROOT c:\\Tomcat\\webapps\\ROOT
ADD $SHBCFG c:\\opt\\shibboleth-idp\\conf
ADD $SHBCREDS c:\\opt\\shibboleth-idp\\credentials
#ADD $SHBVIEWS c:\\opt\\shibboleth-idp\\views
#ADD $SHBEDWAPP c:\\opt\\shibboleth-idp\\edit-webapp
#ADD $SHBMSGS c:\\opt\\shibboleth-idp\\messages
ADD $SHBMD c:\\opt\\shibboleth-idp\\metadata

# Uncomment if using secrets; removes existing files from the container so that secrets can propagate (issue with Windows containers)
# 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