MariaDB relational database in the Docker
container.
- Docker Registry @monstrenyatko/rpi-mariadb
- GitHub @monstrenyatko/docker-rpi-mariadb
- Official Docker Registry @mariadb
-
Pull prebuilt
Docker
image:docker pull monstrenyatko/rpi-mariadb
-
Start prebuilt image:
docker-compose up -d
-
Retrieve
root
password:root
password is randomly generated on first start (Seedocker-compose.yml
). Check logs to find the string prefixed withGENERATED ROOT PASSWORD
:docker-compose logs | grep "GENERATED ROOT PASSWORD"
-
Verify default configuration:
docker exec -it mariadb mysql -h localhost -u root -p <enter root password>
-
Follow the instructions printed in logs on first boot to change
root
password:docker-compose logs
-
Stop/Restart:
docker-compose stop docker-compose start
-
Configuration:
- Add additional configuration file:
mariadb: ... volumes: - ./custom.cnf:/etc/mysql/conf.d/custom.cnf:ro
- Override the main configuration file:
mariadb: ... volumes: - ./my_custom.cnf:/etc/mysql/my.cnf:ro
See official Docker image about all available options.
Container is already configured for automatic restart (See docker-compose.yml
).
cd <path to sources>
./build.sh <tag name>