feature(dockerfile): add basic healthcheck

- check mysqld service only, not actual database
This commit is contained in:
Asif Bacchus 2021-09-07 03:06:20 -06:00
parent 1c5dc6cb12
commit 6aae1c80e4
1 changed files with 8 additions and 0 deletions

View File

@ -30,6 +30,14 @@ EXPOSE 3306
# create volume if user forgets
VOLUME ["/var/lib/mysql"]
# basic healthcheck (service only)
HEALTHCHECK \
--interval=30s \
--timeout=10s \
--start-period=30s \
--retries=3 \
CMD mysqladmin ping --silent
# set environment variables
ENV TZ=Etc/UTC
ENV MYSQL_UID=8100