Skip to content

Commit

Permalink
Merge pull request #121 from docker/4.3.1_20230914
Browse files Browse the repository at this point in the history
4.3.1 20230914
  • Loading branch information
pcaskey authored Sep 15, 2023
2 parents 9a4a7c4 + 3289e18 commit 6cd47b4
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 19 deletions.
26 changes: 15 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ FROM --platform=$TARGETPLATFORM rockylinux:8.8
#
##tomcat \
ENV TOMCAT_MAJOR=9 \
TOMCAT_VERSION=9.0.79 \
TOMCAT_VERSION=9.0.80 \
##shib-idp \
VERSION=4.3.1 \
##TIER \
TIERVERSION=20230818_rocky8_multiarch \
TIERVERSION=20230914 \
#################### \
#### OTHER VARS #### \
#################### \
Expand Down Expand Up @@ -108,19 +108,23 @@ RUN mkdir -p "$CATALINA_HOME" && set -x \
&& gpg --batch --verify $CATALINA_HOME/tomcat.tar.gz.asc $CATALINA_HOME/tomcat.tar.gz \
&& tar -xvf $CATALINA_HOME/tomcat.tar.gz -C $CATALINA_HOME --strip-components=1 \
&& rm $CATALINA_HOME/bin/*.bat \
&& rm $CATALINA_HOME/tomcat.tar.gz*
RUN mkdir -p $CATALINA_HOME/conf/Catalina \
&& rm -rf /usr/local/tomcat/webapps/* \
&& ln -s /opt/shibboleth-idp/war/idp.war $CATALINA_HOME/webapps/idp.war

ADD container_files/tomcat/jstl-1.2.jar /usr/local/tomcat/lib/
&& rm $CATALINA_HOME/tomcat.tar.gz* \
&& mkdir -p $CATALINA_HOME/conf/Catalina \
&& rm -rf /usr/local/tomcat/webapps/* \
&& ln -s /opt/shibboleth-idp/war/idp.war $CATALINA_HOME/webapps/idp.war
ADD container_files/idp/idp.xml /usr/local/tomcat/conf/Catalina/idp.xml
ADD container_files/tomcat/server.xml /usr/local/tomcat/conf/server.xml
#ADD https://repo.maven.apache.org/maven2/jstl/jstl/1.2/jstl-1.2.jar /usr/local/tomcat/lib/
ADD container_files/tomcat/jstl-1.2.jar /usr/local/tomcat/lib/

#use log4j for tomcat logging
ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.18.0/log4j-core-2.18.0.jar /usr/local/tomcat/bin/
ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.18.0/log4j-api-2.18.0.jar /usr/local/tomcat/bin/
ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul/2.18.0/log4j-jul-2.18.0.jar /usr/local/tomcat/bin/
#ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.17.2/log4j-core-2.17.2.jar /usr/local/tomcat/bin/
COPY container_files/tomcat/log4j-core-2.17.2.jar /usr/local/tomcat/bin/
#ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.17.2/log4j-api-2.17.2.jar /usr/local/tomcat/bin/
COPY container_files/tomcat/log4j-api-2.17.2.jar /usr/local/tomcat/bin/
#ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul/2.17.2/log4j-jul-2.17.2.jar /usr/local/tomcat/bin/
COPY container_files/tomcat/log4j-jul-2.17.2.jar /usr/local/tomcat/bin/

RUN cd /usr/local/tomcat/; \
chmod +r bin/log4j-*.jar;
ADD container_files/tomcat/log4j2.xml /usr/local/tomcat/conf/
Expand Down
2 changes: 1 addition & 1 deletion container_files/system/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ sed -i -e '/<rollingPolicy/,/<\/rollingPolicy>/d' ${IDP_LOG_CFG_FILE}


#launch supervisord
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
Binary file added container_files/tomcat/log4j-api-2.17.2.jar
Binary file not shown.
Binary file added container_files/tomcat/log4j-core-2.17.2.jar
Binary file not shown.
Binary file added container_files/tomcat/log4j-jul-2.17.2.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion test-compose/idp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM tier/shib-idp:latest
FROM i2incommon/shib-idp:latest

# The build args below can be used at build-time to tell the build process where to find your config files. This is for a completely burned-in config.
ARG TOMCFG=config/tomcat
Expand Down
10 changes: 7 additions & 3 deletions tests/checkidpver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ if [ $? == '0' ]; then
if [ $? -ne '0' ]; then
docker run -d $1 &>/dev/null
launchflag="yes"
echo 'launching container (will take about a minute)...'
sleep 60
echo 'launching container (will take about 2 minutes)...'
sleep 120
fi

#get container ID
Expand All @@ -34,6 +34,8 @@ if [ $? == '0' ]; then
echo "Specified container does not appear to be running... Terminating."
echo ""
exit 1
else
echo "Container is running at id: $contid"
fi

#get version from running status page inside container
Expand All @@ -47,10 +49,12 @@ if [ -z "$(echo $shibver | xargs)" ]; then
echo "Unable to determine version from a running instance... Terminating."
echo ""
exit 1
else
echo "Running shibb version is: $shibver"
fi

#check if that version is available in the 'latest' download area (return is 0 if current, non-zero if not current)
wget -q --spider https://shibboleth.net/downloads/identity-provider/latest/shibboleth-identity-provider-${shibver}.tar.gz
wget --no-check-certificate --spider https://shibboleth.net/downloads/identity-provider/latest/shibboleth-identity-provider-${shibver}.tar.gz

if [ $? == '0' ]; then
echo "Running IdP version (${shibver}) is current!"
Expand Down
8 changes: 5 additions & 3 deletions tests/main.bats
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ load ../common
./tests/checktomcatver.sh ${imagename}_${tag}
}

@test "060 The version of the IdP is current" {
./tests/checkidpver.sh ${imagename}_${tag}
}

#@test "060 The version of the IdP is current" {
# ./tests/checkidpver.sh ${maintainer}/${imagename}
#}


@test "070 The IdP successfully completed a full-cycle test with an SP" {
./tests/fulltest.sh
Expand Down

0 comments on commit 6cd47b4

Please sign in to comment.