This Docker image (yobasystems/alpine-mariadb) is based on the minimal Alpine Linux with MariaDB v10.1.32 (MySQL Compatible) database server.
Alpine Linux is a Linux distribution built around musl libc and BusyBox. The image is only 5 MB in size and has access to a package repository that is much more complete than other BusyBox based images. This makes Alpine Linux a great image base for utilities and even production applications. Read more about Alpine Linux here and you can see how their mantra fits in right at home with Docker images.
MariaDB Server is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, WordPress.com and Google.
MariaDB turns data into structured information in a wide array of applications, ranging from banking to websites. It is an enhanced, drop-in replacement for MySQL. MariaDB is used because it is fast, scalable and robust, with a rich ecosystem of storage engines, plugins and many other tools make it very versatile for a wide variety of use cases.
MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features.
- Minimal size only 48 MB and only 4 layers
- Memory usage is minimal on a simple install.
- MariaDB the MySQL replacement
:amd64
,:latest
- 64 bit Intel/AMD (x86_64/amd64):i386
,:x86
- 32 bit Intel/AMD (x86/i686):arm64v8
,:aarch64
- 64 bit ARM (ARMv8/aarch64):arm32v7
,:armhf
- 32 bit ARM (ARMv7/armhf)
:latest
,:amd64
latest branch based on amd64:master
master branch usually inline with latest:v0.0.0
version number related to mariadb version:armhf
,:arm32v7
Armv7 based on latest tag but arm architecture
/var/lib/mysql
: Database files/var/lib/mysql/mysql-bin
: MariaDB logs
MYSQL_DATABASE
: specify the name of the databaseMYSQL_USER
: specify the User for the databaseMYSQL_PASSWORD
: specify the User password for the databaseMYSQL_ROOT_PASSWORD
: specify the root password for Mariadb
docker run -it --name mysql -p 3306:3306 -v /var/lib/mysql:/var/lib/mysql -e MYSQL_DATABASE=wordpressdb -e MYSQL_USER=wordpressuser -e MYSQL_PASSWORD=hguyFt6S95dgfR4ryb -e MYSQL_ROOT_PASSWORD=hguyFtgfR4r9R4r76 yobasystems/alpine-mariadb
It will create a new db, and set mysql root password (default is RaNd0MpA$$W0Rd generated by pwgen) unless the data already exists.
####(Please pass your own credentials or let them be generated automatically, don't use these ones for production!!)
mysql:
image: yobasystems/alpine-mariadb
environment:
MYSQL_ROOT_PASSWORD: hguyFtgfR4r9R4r76
MYSQL_DATABASE: wordpressdb
MYSQL_USER: wordpressuser
MYSQL_PASSWORD: hguyFt6S95dgfR4ryb
expose:
- "3306"
volumes:
- /data/example/mysql:/var/lib/mysql
restart: always