Last active
October 9, 2019 23:29
-
-
Save ivanmonteiro/5ce1783a03f990d1ede63e8b59641d19 to your computer and use it in GitHub Desktop.
Mysql 5.7 docker with data volume, restart unless stopeed and custom config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run --name mysql --env-file /home/ubuntu/mysql-env/.env -v /home/ubuntu/mysql-data:/var/lib/mysql -v /home/ubuntu/mysql-config/my.cnf:/etc/my.cnf -p 3306:3306 -d --restart unless-stopped mysql:5.7 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.env file contents:
MYSQL_ROOT_PASSWORD=
MYSQL_DATABASE=
MYSQL_USER=
MYSQL_PASSWORD=