Skip to content

Instantly share code, notes, and snippets.

@projectivemotion
Forked from eneas/startmysqlondocker.sh
Created September 16, 2018 23:17
Show Gist options
  • Save projectivemotion/8a39238ee9ad0378a8486d5585beab19 to your computer and use it in GitHub Desktop.
Save projectivemotion/8a39238ee9ad0378a8486d5585beab19 to your computer and use it in GitHub Desktop.
#learnmysql_init will pull mysql and phpmyadmin/phpmyadmin images from the registry
function learnmysql_intit {
#Change supersecretpassword to work in not trusted network.
docker run --name mysql -e MYSQL_ROOT_PASSWORD="supersecretpassword" -d mysql
docker run --name phpmyadmin -d --link mysql:db -p 8080:80 phpmyadmin/phpmyadmin
}
function learnmysql_stop {
docker stop mysql phpmyadmin
}
function learnmysql_start {
docker start mysql phpmypadmin
}
function learnmysql_clean {
docker rm mysql phpmypadmin
docker rmi mysql phpmyadmin/phpmyadmin
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment