Skip to content

chb/alpine-mariadb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MariaDB Docker image running on Alpine Linux

Docker Layers Docker Size Docker Stars Docker Pulls

Alpine Version MariaDB Version

This Docker image (yobasystems/alpine-mariadb) is based on the minimal Alpine Linux with Mariadb 10.1.21 (MySQL Compatible) database server.

Features

  • Minimal size only 48 MB and only 4 layers
  • Memory usage is minimal on a simple install.
  • Mariadb Version 10.1.21
  • Armv7 (armhf) version with :armhf tag

Tags

  • :latest latest nginx & alpine
  • :master master branch usually inline with latest
  • :v0.0.0 version number related to nginx version
  • :armhf Armv7 based on latest tag but arm architecture

Creating an instance

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.

Volume structure

  • /var/lib/mysql: Database files
  • /var/lib/mysql/mysql-bin: MariaDB logs

Environment Variables:

Main Mariadb parameters:

  • MYSQL_DATABASE: specify the name of the database
  • MYSQL_USER: specify the User for the database
  • MYSQL_PASSWORD: specify the User password for the database
  • MYSQL_ROOT_PASSWORD: specify the root password for Mariadb

https://mariadb.org/

Docker Compose example:

####(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

Source Repository

Links

About

Mariadb running on Alpine Linux [docker]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%