Skip to content
Docker + Alpine + MariaDB(Mysql)
Shell Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Dockerfile upgrade mariadb version to 10.3.15 Jun 17, 2019
README.md
docker-compose.build.yml update readme for 10.3.15 Jun 17, 2019
docker-compose.yml upgrade mariadb version to 10.3.15 Jun 17, 2019
startup.sh

README.md

Docker + Alpine + MariaDB(Mysql)

This is an upgrade to the leafney/docker-alpine-mysql project and renamed to leafney/alpine-mariadb.

Parameters

  • MYSQL_ROOT_PWD : root Password default is "mysql"
  • MYSQL_USER : new UserName
  • MYSQL_USER_PWD : new User Password
  • MYSQL_USER_DB : new Database for new User

Get Image from DockerHub

Download from DockerHub for latest tags or specific version tags:

$ docker pull leafney/alpine-mariadb:latest

Run a default contaier

$ docker run --name mysql -v /mysql/data/:/var/lib/mysql -d -p 3306:3306 leafney/alpine-mariadb:latest

Run a container with new User and Password

$ docker run --name mysql -v /mysql/data/:/var/lib/mysql -d -p 3306:3306 -e MYSQL_ROOT_PWD=123 -e MYSQL_USER=dev -e MYSQL_USER_PWD=dev leafney/alpine-mariadb:latest

Run a container with new Database for new User and Password

$ docker run --name mysql -v /mysql/data/:/var/lib/mysql -d -p 3306:3306 -e MYSQL_ROOT_PWD=123 -e MYSQL_USER=dev -e MYSQL_USER_PWD=dev -e MYSQL_USER_DB=userdb leafney/alpine-mariadb:latest

Run with docker-compose file

$ docker-compose up -d

Build with docker-compose file

$ docker-compose -f docker-compose.build.yml up -d

Note: Please get the latest version of mysql from the website https://pkgs.alpinelinux.org/packages if you encounter problems in building.

You can’t perform that action at this time.