MySQL image based on Alpine Linux
993
$ docker run -d --name mysql -e 'DB=mydatabase' -e 'USER=gustavo' -e 'PASS=docker' gustavohenrique/mysql
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.
$ 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
Content type
Image
Digest
sha256:192206171…
Size
45.5 MB
Last updated
almost 11 years ago
docker pull gustavohenrique/mysql