dperson/mariadb
MariaDB docker container
MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. Being a fork of a leading open source software system, it is notable for being led by the original developers of MySQL, who forked it due to concerns over its acquisition by Oracle.[5] Contributors are required to share their copyright with the MariaDB Foundation.
When started MariaDB container will listen on port 3306.
sudo docker run -it -p 3306:3306 -d dperson/mariadb
sudo docker run -it --rm dperson/mariadb -h
Usage: mariadb.sh [-opt] [command]
Options (fields in '[]' are optional, '<>' are required):
-h This help
-t "" Configure timezone
possible arg: "[timezone]" - zoneinfo timezone for container
The 'command' (if provided and valid) will be run instead of mariadb
ENVIRONMENT VARIABLES
SQL_ROOT_PASSWORD
- Will set root password when initializing containerSQL_ALLOW_EMPTY_PASSWORD
- Allow empty passwords (bad idea)DATABASE
- Will create DB when initializing containerSQL_USER
- Will create user when initializing containerSQL_PASSWORD
- Will be used in creating user aboveTZ
- As above, configure the zoneinfo timezone, IE EST5EDT
USERID
- Set the UID for the DB userGROUPID
- Set the GID for the DB userAny of the commands can be run at creation with docker run
or later with
docker exec -it mariadb mariadb.sh
(as of version 1.3 of docker).
sudo docker run -it -p 3306:3306 -d dperson/mariadb -t EST5EDT
OR using environment variables
sudo docker run -it -p 3306:3306 -e TZ=EST5EDT -d dperson/mariadb
Will get you the same settings as
sudo docker run -it --name db -p 3306:3306 -d dperson/mariadb
sudo docker exec -it db mariadb.sh -t EST5EDT ls -AlF /etc/localtime
sudo docker restart db
If you wish to adapt the default configuration, use something like the following to copy it from a running container:
sudo docker cp db:/etc/mysql /some/path
You can use the modified configuration with:
sudo docker run -it --name db -p 3306:3306 -v /some/path:/etc/mysql:ro \
-d dperson/mariadb
If you have any problems with or questions about this image, please contact me through a GitHub issue.
docker pull dperson/mariadb