Skip to content

Commit

Permalink
Merge pull request #21 from docker/3.3instrumenting
Browse files Browse the repository at this point in the history
3.3 instrumenting
  • Loading branch information
pcaskey authored Feb 11, 2017
2 parents df95638 + 8a26bd4 commit 5e0b842
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ ARG maintainer=tier
ARG imagename=shibboleth_idp
ARG version=3.3.0
ENV VERSION=$version
ENV IMAGENAME=$imagename
ENV MAINTAINER=$maintainer

MAINTAINER $maintainer
LABEL Vendor="Internet2"
Expand Down Expand Up @@ -72,7 +74,7 @@ RUN mkdir -p "$CATALINA_HOME"
# done

ENV TOMCAT_MAJOR 8
ENV TOMCAT_VERSION 8.0.39
ENV TOMCAT_VERSION 8.0.41
ENV TOMCAT_TGZ_URL https://www.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz

WORKDIR $CATALINA_HOME
Expand All @@ -90,6 +92,15 @@ RUN set -x \
ADD files/idp.xml conf/Catalina/idp.xml
ADD files/server.xml conf/server.xml

ADD files/tier-crontab /opt/tier/tier-crontab
RUN crontab /opt/tier/tier-crontab
ADD files/bin/startcron.sh /usr/bin/startcron.sh
RUN chmod +x /usr/bin/startcron.sh
ADD files/bin/sendtierbeacon.sh /usr/bin/sendtierbeacon.sh
RUN touch /var/log/cron.log

ENV PATH $CATALINA_HOME/bin:$JAVA_HOME/bin:$PATH

ONBUILD COPY ./root/ /opt/shibboleth/$SHIB_PREFIX/

CMD /usr/bin/startcron.sh
7 changes: 7 additions & 0 deletions files/bin/sendtierbeacon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
LOGHOST="cerif.org"
LOGPORT="5000"
LOGTEXT="TIERBEACON/TIER/1.0#IM=$IMAGENAME#IV=$VERSION#MT=$MAINTAINER#"
if [ -z "$TIER_BEACON_OPT_OUT" ]; then
`logger -n $LOGHOST -P $LOGPORT -t TIERBEACON $LOGTEXT`
fi
3 changes: 3 additions & 0 deletions files/bin/startcron.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
cron
touch /var/log/cron.log
2 changes: 2 additions & 0 deletions files/tier-crontab
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#send daily ping to TIER Central
0 0 * * * /usr/bin/sendtierbeacon.sh >> /var/log/cron.log 2>&1

0 comments on commit 5e0b842

Please sign in to comment.