Skip to content

Commit 90341bd

Browse files
committed
Add healthcheck for php and zabbix-agent packages
1 parent cbd31ec commit 90341bd

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

config/php/Dockerfile.8.1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,7 @@ COPY ./xdebug.ini /etc/php/8.1/mods-available/xdebug.ini
4444
RUN usermod -u 1000 www-data
4545
RUN groupmod -g 1000 www-data
4646

47+
HEALTHCHECK --interval=30s --timeout=10s --retries=10 --start-period=10s \
48+
CMD php --ini || exit 1
49+
4750
EXPOSE 9000

config/php/Dockerfile.8.2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,7 @@ COPY ./xdebug.ini /etc/php/8.2/mods-available/xdebug.ini
4444
RUN usermod -u 1000 www-data
4545
RUN groupmod -g 1000 www-data
4646

47+
HEALTHCHECK --interval=30s --timeout=10s --retries=10 --start-period=10s \
48+
CMD php --ini || exit 1
49+
4750
EXPOSE 9000

config/php/Dockerfile.8.3

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,7 @@ COPY ./xdebug.ini /etc/php/8.3/mods-available/xdebug.ini
4444
RUN usermod -u 1000 www-data
4545
RUN groupmod -g 1000 www-data
4646

47+
HEALTHCHECK --interval=30s --timeout=10s --retries=10 --start-period=10s \
48+
CMD php --ini || exit 1
49+
4750
EXPOSE 9000

config/zabbix/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ USER 0
1111
# ERROR 1045 (28000): Plugin caching_sha2_password could not be loaded: Error loading shared library /usr/lib/mariadb/plugin/caching_sha2_password.so: No such file or directory
1212
RUN apk add --no-cache mysql-client mariadb-connector-c
1313

14+
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
15+
CMD zabbix_agent2 -t agent.ping || exit 1
16+
1417
USER 1997

0 commit comments

Comments
 (0)