manoj23 / dockerfile-mysql_install_db

Dockerfile for mysql_install_db

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dockerfile-mysql_install_db

This is a simple alpine container that runs the mysql_install_db.sh script.

Example of docker build

docker build -t mysql_install_db https://github.com:/manoj23/dockerfile-mysql_install_db.git

Example of docker run

Run the following command to initialize the data directory:

$ mkdir -p /path/to/db/
$ docker run --rm -ti \
	-v $(pwd)/example.json:/root/example.json \
	-v /path/to/db/:/var/lib/mysql \
	mysql_install_db /root/example.json /var/lib/mysql

Example using docker_mysql_install_db.sh

$ mkdir -p /path/to/db/
$ ./docker_mysql_install_db.sh /path/to/conf.json /path/to/db /path/to/db.sql

About

Dockerfile for mysql_install_db


Languages

Language:Shell 73.1%Language:Dockerfile 26.9%