Public | Automated Build

Last pushed: 4 months ago
Short Description
dasddasdasdsdasdasdd
Full Description

MariaDB Docker image running on Alpine Linux

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 Run

docker run -d \
  --name mysql \
  -p 172.17.0.1:3306:3306 \
  -v /data/mysql:/var/lib/mysql \
  -e MYSQL_ROOT_PASSWORD=notasecret \
  -e MYSQL_DATABASE=test \
  -e MYSQL_USER=test \
  -e MYSQL_PASSWORD=test \
  cryptoplay/alpine-mariadb:latest

Docker Compose example:

####(Please pass your own credentials or let them be generated automatically, don't use these ones for production!!)

mysql:
  image: cryptoplay/alpine-mariadb:latest
  environment:
    MYSQL_ROOT_PASSWORD: notasecret
    MYSQL_DATABASE: test
    MYSQL_USER: test
    MYSQL_PASSWORD: test
  expose:
    - "3306"
  volumes:
    - /data/mysql:/var/lib/mysql
  restart: always

Source Repository

Links

Docker Pull Command
Owner
cryptoplay

Comments (0)