Skip to content
Docker + Alpine-3.4 + Mysql/MariaDB-10.1.18 | upgrade newest to https://github.com/leafney/alpine-mariadb
Shell
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Dockerfile Init Oct 26, 2016
README.md Init Oct 26, 2016
startup.sh Fix typo May 12, 2017

README.md

Docker + Alpine-3.4 + Mysql/MariaDB-10.1.18

parameter

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

build image

$ docker build -t="leafney/docker-alpine-mysql" .

run a default contaier

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

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/docker-alpine-mysql

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/docker-alpine-mysql
You can’t perform that action at this time.