The LinuxServer.io team brings you another quality container release featuring easy user mapping and community support. Be sure to checkout our forums or for real-time support our IRC on freenode at #linuxserver.io.
linuxserver/mariadb
Usage
docker create \
--name=mariadb \
-p 3306:3306 \
-e PUID=<UID> \
-e PGID=<GID> \
-e MYSQL_ROOT_PASSWORD=<DATABASE PASSWORD> \
-v </path/to/appdata>:/config \
linuxserver/mariadb
Parameters
-p 3306- mysql port-v /config- Contains the db itself and all assorted settings.-e MYSQL_ROOT_PASSWORD- set this to root password for installation (minimum 4 characters)-e PGIDfor GroupID - see below for explanation-e PUIDfor UserID - see below for explanation
It is based on phusion-baseimage with ssh removed, for shell access whilst the container is running do docker exec -it mariadb /bin/bash.
User / Group Identifiers
TL;DR - The PGID and PUID values set the user / group you'd like your container to 'run as' to the host OS. This can be a user you've created or even root (not recommended).
Part of what makes our containers work so well is by allowing you to specify your own PUID and PGID. This avoids nasty permissions errors with relation to data volumes (-v flags). When an application is installed on the host OS it is normally added to the common group called users, Docker apps due to the nature of the technology can't be added to this group. So we added this feature to let you easily choose when running your containers.
Setting up the application
If you didn't set a password during installation, (see logs for warning) use mysqladmin -u root password to set one at the docker prompt... NOTE changing the MYSQL_ROOT_PASSWORD variable after the container has set up the initial databases has no effect. It is also advisable to edit the run command or template/webui after setup and remove reference to this variable.
Find my.cnf in /config, the databases in /config/databases and the log in /config/log/myqsl
The container also has mysqltuner included which can either be run from within the container by exec'ing in or externally by issuing docker exec -it mariadb mysqltuner. It will prompt for credentials if you have set a password for root user.
Logs
- To monitor the logs of the container in realtime
docker logs -f mariadb.
Versions
- 26.01.2016: Change user of mysqld_safe script to abc, better unclean shutdown handling on restart.
- 23.12.2015: Remove autoupdating, between some version updates the container breaks
- 12.08.2015: Initial Release.
