Skip to content

Commit d42b1fa

Browse files
committed
Add healthcheck to base images
1 parent 74a6d91 commit d42b1fa

11 files changed

Lines changed: 99 additions & 0 deletions

File tree

‎apache2-shibboleth/Dockerfile‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,11 @@ EXPOSE 80
3333
# Start Shibboleth and Apache
3434
ENTRYPOINT ["/entrypoint.sh"]
3535
CMD ["/usr/local/bin/shib.sh"]
36+
37+
HEALTHCHECK \
38+
--start-period=30s \
39+
--start-interval=1s \
40+
--interval=10s \
41+
--timeout=1s \
42+
--retries=20 \
43+
CMD curl --fail -s -o /dev/null -w "%{http_code}" http://localhost/internal/health

‎apache2/Dockerfile‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,11 @@ EXPOSE 80
4545
# Start Apache
4646
ENTRYPOINT ["/entrypoint.sh"]
4747
CMD ["apachectl", "-D", "FOREGROUND"]
48+
49+
HEALTHCHECK \
50+
--start-period=30s \
51+
--start-interval=1s \
52+
--interval=10s \
53+
--timeout=1s \
54+
--retries=20 \
55+
CMD curl --fail -s -o /dev/null -w "%{http_code}" http://localhost/internal/health

‎haproxy28/Dockerfile‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
11
FROM haproxy:2.8
2+
3+
USER root
4+
RUN apt-get update && \
5+
apt-get install -y curl && \
6+
rm -rf /var/lib/apt/lists/* \
7+
USER haproxy
8+
29
COPY conf/haproxy.pem /usr/local/etc/haproxy
310

11+
HEALTHCHECK \
12+
--start-period=30s \
13+
--start-interval=1s \
14+
--interval=10s \
15+
--timeout=1s \
16+
--retries=20 \
17+
CMD curl --fail -s -o /dev/null -w "%{http_code}" http://localhost/internal/health
18+

‎php72-apache2-node14-composer2/Dockerfile‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@ RUN mkdir /var/www/html/public
2525

2626
RUN rm -rf /etc/apache2/sites-enabled/*
2727
COPY ./conf/appconf.conf /etc/apache2/sites-enabled/
28+
29+
HEALTHCHECK \
30+
--start-period=30s \
31+
--start-interval=1s \
32+
--interval=10s \
33+
--timeout=1s \
34+
--retries=20 \
35+
CMD curl --fail -s -o /dev/null -w "%{http_code}" http://localhost/internal/health

‎php72-apache2-node16-composer2/Dockerfile‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@ RUN mkdir /var/www/html/public
2525

2626
RUN rm -rf /etc/apache2/sites-enabled/*
2727
COPY ./conf/appconf.conf /etc/apache2/sites-enabled/
28+
29+
HEALTHCHECK \
30+
--start-period=30s \
31+
--start-interval=1s \
32+
--interval=10s \
33+
--timeout=1s \
34+
--retries=20 \
35+
CMD curl --fail -s -o /dev/null -w "%{http_code}" http://localhost/internal/health

‎php72-apache2/Dockerfile‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,11 @@ EXPOSE 80
8686
# Start Apache
8787
ENTRYPOINT ["/entrypoint.sh"]
8888
CMD ["apache2-foreground"]
89+
90+
HEALTHCHECK \
91+
--start-period=30s \
92+
--start-interval=1s \
93+
--interval=10s \
94+
--timeout=1s \
95+
--retries=20 \
96+
CMD curl --fail -s -o /dev/null -w "%{http_code}" http://localhost/internal/health

‎php82-apache2-node20-composer2/Dockerfile‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@ RUN mkdir -p /var/www/html/public
2525

2626
RUN rm -rf /etc/apache2/sites-enabled/*
2727
COPY ./conf/appconf.conf /etc/apache2/sites-enabled/
28+
29+
HEALTHCHECK \
30+
--start-period=30s \
31+
--start-interval=1s \
32+
--interval=10s \
33+
--timeout=1s \
34+
--retries=20 \
35+
CMD curl --fail -s -o /dev/null -w "%{http_code}" http://localhost/internal/health

‎php82-apache2/Dockerfile‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,11 @@ EXPOSE 80
7272
# Start Apache
7373
ENTRYPOINT ["/entrypoint.sh"]
7474
CMD ["apache2-foreground"]
75+
76+
HEALTHCHECK \
77+
--start-period=30s \
78+
--start-interval=1s \
79+
--interval=10s \
80+
--timeout=1s \
81+
--retries=20 \
82+
CMD curl --fail -s -o /dev/null -w "%{http_code}" http://localhost/internal/health

‎php85-apache2-node24/Dockerfile‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,11 @@ RUN mkdir -p /var/www/html/public
2424

2525
RUN rm -rf /etc/apache2/sites-enabled/*
2626
COPY ./conf/appconf.conf /etc/apache2/sites-enabled/
27+
28+
HEALTHCHECK \
29+
--start-period=30s \
30+
--start-interval=1s \
31+
--interval=10s \
32+
--timeout=1s \
33+
--retries=20 \
34+
CMD curl --fail -s -o /dev/null -w "%{http_code}" http://localhost/internal/health

‎php85-apache2/Dockerfile‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,11 @@ EXPOSE 80
7676
# Start Apache
7777
ENTRYPOINT ["/entrypoint.sh"]
7878
CMD ["apache2-foreground"]
79+
80+
HEALTHCHECK \
81+
--start-period=30s \
82+
--start-interval=1s \
83+
--interval=10s \
84+
--timeout=1s \
85+
--retries=20 \
86+
CMD curl --fail -s -o /dev/null -w "%{http_code}" http://localhost/internal/health

0 commit comments

Comments
 (0)