From 61aed2c5d3a10ee0629856d52594d1842ebee942 Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Wed, 28 Jun 2017 11:40:26 -0500 Subject: [PATCH] add health check to Dockerfile --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 7c0adfe..d3983da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -222,5 +222,10 @@ ARG SHBLOG=logs/shib-idp # Expose the port tomcat will be serving on EXPOSE 8443 +#establish a healthcheck command so that docker might know the container's true state +HEALTHCHECK --interval=2m --timeout=30s \ + CMD curl -k -f https://127.0.0.1:8443/idp/status || exit 1 + + # Start tomcat/crond CMD ["/usr/bin/startup.sh"]