Update README.md

This commit is contained in:
a-Sansara 2016-07-28 17:46:03 +02:00 committed by GitHub
parent 3e731a526a
commit 81eb79aec5

View File

@ -1,18 +1,18 @@
# pluie/alpine-mysql # pluie/alpine-mysql
This Image extend pluie/alpine with mysql (mariadb) 5.5.47 Extend pluie/alpine with mysql (mariadb) 5.5.47
## Docker image size ## Image Size
- image ~ 160 MB - image ~ 160 MB
## Docker image volumes ## Image Volumes
__/var/lib/mysql__ : mysql database directory __/var/lib/mysql__ : mysql database directory
__/dump__ : directory to store various mysql scripts __/dump__ : directory to store various mysql scripts
## Docker ENV variables ## ENV variables
__MYSQL_DATABASE__ : create specified database at startup __MYSQL_DATABASE__ : create specified database at startup
__MYSQL_USER__ : create specified user at startup (and grant all rights to __MYSQL_DATABASE__) __MYSQL_USER__ : create specified user at startup (and grant all rights to __MYSQL_DATABASE__)
@ -20,13 +20,13 @@ __MYSQL_PASSWORD__
__MYSQL_ROOT_PASSWORD__ : don't really need it. a random root password is generated if none __MYSQL_ROOT_PASSWORD__ : don't really need it. a random root password is generated if none
## Docker image usage ## Image Usage
``` ```
$ docker run --name mysql -p 3306 -v /home/docker/db/mysql:/var/lib/mysql -v /home/docker/db/dump:/dump -e MYSQL_DATABASE=mybase -e MYSQL_USER=dev -e MYSQL_PASSWORD=mysql -it pluie/alpine-mysqldocker $ docker run --name mysql -p 3306 -v /home/docker/db/mysql:/var/lib/mysql -v /home/docker/db/dump:/dump -e MYSQL_DATABASE=mybase -e MYSQL_USER=dev -e MYSQL_PASSWORD=mysql -it pluie/alpine-mysqldocker
``` ```
### root usage ### Root Usage
a root user is created at startup (if database directory is empty) a root user is created at startup (if database directory is empty)
root login is permit only on localhost root login is permit only on localhost
@ -45,7 +45,7 @@ $ mysql -uroot mybase < /dump/mydump.sql
etc. etc.
### user usage ### User usage
locally (on host) you can run (with appropriate user : pass) : locally (on host) you can run (with appropriate user : pass) :
``` ```
@ -56,7 +56,7 @@ or if you want use the mysql client of the container :
docker exec -it mysql "mysql -h ipmysqlcontainer -udev -pmysql" docker exec -it mysql "mysql -h ipmysqlcontainer -udev -pmysql"
``` ```
## Link container ## Link Container
to link this container to another, use the default docker behavior : to link this container to another, use the default docker behavior :
``` ```