Simple MariaDB server on Alpine. The image tries to match UID & GID permission on local machine.
docker run --name mariadb \
-p 3316:3306 \
-v /var/lib/mysql:/var/lib/mysql \
-v /var/log/mysql:/var/log/mysql \
-v /etc/mysql:/etc/mysql \
-h mariadb -d \
aquaron/mariadb
Launches mysqld
by default. If configuration is not found, initializes with default configuration.
runme.sh
accepts these commands:
Command | Description |
---|---|
init | initialize directories if they're empty |
bootstrap | create new database (calls init ) |
daemon | run in non-detached mode |
start | start mariadb server |
stop | quick mariadb shutdown (requires mysql-client ) |
kill | killall msyql |
Holds all system configuration that pertain to the container, you should only change this if you have multiple instances of the container running.
Container is set as a master as default.
To enable, remove -disabled
from the filename.
For larger systems, enable this file.
Systems smaller than 1GB memory.
Encrypt log file.
Contains the auto-generated root password.
Sets configuration key_buffer_size
to 125% of the current system's memory per MariaDB's
recommendation.
Bootstraping the server also yield 2 files install-systemd.sh
and docker-mariadb.service
they're
located in where you map your directory to /etc/mysql
. After configuration, check this directory
and run install-systemd.sh
it will use systemd
.
This script is based on Docker's documentation on auto starting containers.
Installing the service by running:
./install-systemd.sh
Follow instruction. After everything looks good you can enable the service by running:
systemctl enable docker-mariadb.service