MariaDB image Dockerfile, based on offical packages
mariadb-client provided by the
This Dockerfile is intended to be used to setup a standalone MariaDB database server.
Lagoon & OpenShift adaptions¶
This image is prepared to be used on Lagoon which leverages OpenShift. There are therefore some things already done:
- Folder permissions are automatically adapted with
fix-permissionsso this image will work with a random user and therefore also on OpenShift.
readiness-probe.shscript to check when mariadb container's readiness.
mysqltuner.pl- Perl script useful for database's parameters tuning
mysql-backup.sh- script for automating the daily mysql backups on development computer
pwgen- utility to generate random and complex passwords
my.cnf configuration file¶
The image ships a default MariaDB configuration file, optimized to work on Lagoon.
Some options are configurable via environments variables (see Environment Variables).
Environment variables defined in MariaDB base image
||lagoon||Database name created at startup|
||lagoon||Default user created at startup|
||lagoon||Password of default user createt at startup|
||Lag00n||MariaDB root user's password|
||utf8mb4||Set the server charset|
||utf8mb4_bin||Set server collation|
||64M||Set the max_allowed_packet size|
||256M||Set the MariaDB InnoDB Buffer Pool Size|
||1||Number of InnoDB Buffer Pool instances|
||64M||Size of InnoDB log file|
||empty||Variable to control the save of slow queries|
||empty||Variable to control the save of ALL queries|
||/var/lib/mysql/backup||Default path for databases' backups|
LAGOON_ENVIRONMENT_TYPE variable is set to
production, performances are set accordly by using