diff --git a/Dockerfile b/Dockerfile index 61aef7e..a71e161 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,9 +7,10 @@ ENV VERSION=$version ENV JAVA_OPTS=-Xmx1500m -XX:MaxPermSize=128m RUN chown -R root:root /opt/shibboleth/shibboleth-identity-provider-$version && \ + rm -rf /usr/local/tomcat/webapps/* && \ ANT_OPTS="-Didp.target.dir=/opt/shibboleth/current" /opt/shibboleth/current/bin/build.sh && \ ln -s /opt/shibboleth/current /opt/shibboleth-idp && \ - ln -s /opt/shibboleth-idp/war/idp.war $CATALINA_HOME/webapps/idp.war + ln -s /opt/shibboleth-idp/war/idp.war $CATALINA_HOME/webapps/ROOT.war EXPOSE 8080 CMD ["catalina.sh", "run"] \ No newline at end of file diff --git a/tests/image.bats b/tests/image.bats index 81a7bee..e3d24d2 100644 --- a/tests/image.bats +++ b/tests/image.bats @@ -21,3 +21,8 @@ load ../common result="$(docker run -i $maintainer/$imagename stat -c '%U' /opt/shibboleth/current/logs)" [ "$result" != 'UNKNOWN' ] } + +@test "Other Tomcat webapps removed" { + result="$(docker run -i $maintainer/$imagename find /usr/local/tomcat/webapps -type d -print0)" + [ "$result" == '/usr/local/tomcat/webapps' ] +} diff --git a/tests/running.bats b/tests/running.bats index 15421a4..d1c9b16 100644 --- a/tests/running.bats +++ b/tests/running.bats @@ -14,3 +14,6 @@ load ../common [ "$result" != '' ] } +@test "Service is Shibboleth" { + docker exec -i $imagename curl -silent http://localhost:8080/ | grep 'Shibboleth' +}