add docker healthchecks to the docker images

Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey 2022-08-25 15:06:23 +02:00
parent c90ee1c4db
commit 1edb422f3d
10 changed files with 35 additions and 2 deletions

View file

@ -19,6 +19,7 @@ RUN set -ex; \
openssl \
netcat \
dpkg-dev \
curl \
; \
rm -rf /var/lib/apt/lists/*
@ -72,4 +73,6 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd
USER www-data
ENTRYPOINT ["start.sh"]
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
HEALTHCHECK CMD (curl -skfI localhost:8000 && curl -skfI localhost:$APACHE_PORT) || exit 1

View file

@ -13,3 +13,5 @@ RUN set -ex; \
rm -rf /var/lib/apt/lists/*
USER 104
HEALTHCHECK CMD curl -skfI localhost:9980 || exit 1

View file

@ -1,5 +1,5 @@
FROM alpine:3.16.2
RUN apk add --update --no-cache lighttpd bash
RUN apk add --update --no-cache lighttpd bash curl
RUN adduser -S www-data -G www-data
RUN rm -rf /etc/lighttpd/lighttpd.conf
@ -14,3 +14,5 @@ RUN chmod +x /start.sh
USER www-data
RUN mkdir -p /var/www/domaincheck/
ENTRYPOINT ["/start.sh"]
HEALTHCHECK CMD curl -skfI localhost:$APACHE_PORT || exit 1

View file

@ -1,2 +1,15 @@
# From https://github.com/h2non/imaginary/blob/master/Dockerfile
FROM nextcloud/imaginary:20220822
USER root
RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
; \
rm -rf /var/lib/apt/lists/*
USER nobody
HEALTHCHECK CMD curl -skI 127.0.0.1:9000 || exit 1

View file

@ -101,3 +101,5 @@ USER root
ENTRYPOINT ["start.sh"]
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
HEALTHCHECK CMD curl -skfI https://localhost:8080 || exit 1

View file

@ -252,3 +252,5 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd
USER www-data
ENTRYPOINT ["/start.sh"]
HEALTHCHECK CMD (nc -z localhost 9000 && curl -skI localhost:7867) || exit 1

View file

@ -1,2 +1,4 @@
# From https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/Dockerfile
FROM onlyoffice/documentserver:7.1.1.23
HEALTHCHECK CMD curl -skfI localhost || exit 1

View file

@ -31,3 +31,5 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd
USER postgres
ENTRYPOINT ["start.sh"]
HEALTHCHECK CMD psql -d "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" -c "select now()" || exit 1

View file

@ -11,3 +11,5 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd
USER redis
ENTRYPOINT ["start.sh"]
HEALTHCHECK CMD redis-cli -a $REDIS_HOST_PASSWORD PING || exit 1

View file

@ -9,6 +9,7 @@ RUN set -ex; \
supervisor \
curl \
ca-certificates \
netcat \
; \
rm -rf /var/lib/apt/lists/*
@ -67,3 +68,5 @@ ENV TALK_PORT=3478
USER talk
ENTRYPOINT ["start.sh"]
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
HEALTHCHECK CMD (curl -skI localhost:8081 && curl -skI localhost:8188 && curl -skf --http0.9 localhost:4222 && nc -z localhost $TALK_PORT) || exit 1