2024-04-06 04:36:16 +08:00
|
|
|
# Dockerfile-db
|
|
|
|
|
FROM mariadb:latest
|
|
|
|
|
|
|
|
|
|
# Add the install.sql file to the docker image
|
|
|
|
|
ADD install/assets/install.sql /docker-entrypoint-initdb.d
|
|
|
|
|
|
2025-08-10 01:05:31 +08:00
|
|
|
# Create a healthcheck script that uses mariadb-admin
|
|
|
|
|
RUN echo '#!/bin/bash\nmariadb-admin ping -h "localhost" --silent' > /usr/local/bin/healthcheck.sh \
|
|
|
|
|
&& chmod +x /usr/local/bin/healthcheck.sh
|
|
|
|
|
|
2024-04-06 04:36:16 +08:00
|
|
|
# Expose port 3306
|
|
|
|
|
EXPOSE 3306
|