Sign inSign up

gustavohenrique/mysql

By gustavohenrique

•Updated almost 11 years ago

MySQL image based on Alpine Linux

Image
1

993

gustavohenrique/mysql repository overview

⁠Quick start

$ docker run -d --name mysql -e 'DB=mydatabase' -e 'USER=gustavo' -e 'PASS=docker' gustavohenrique/mysql

⁠Keep data

You should mount a volume at /var/lib/mysql to keep data saved.

$ docker run -d --name mysql -e 'DB=mydatabase' -e 'USER=gustavo' -e 'PASS=docker' -v $PWD/mysql:/var/lib/mysql gustavohenrique/mysql

This will make sure that the data stored in the database is not lost when the container is stopped and started again.

⁠Restore dump

$ docker run -d --name mysql -e 'DB=mydatabase' -e 'USER=gustavo' -e 'PASS=docker' -e 'DUMP=/tmp/data.sql' -v $PWD/dump:/tmp/dump gustavohenrique/mysql

Tag summary

Content type

Image

Digest

sha256:192206171…

Size

45.5 MB

Last updated

almost 11 years ago

docker pull gustavohenrique/mysql