Last active
October 17, 2018 15:52
-
-
Save thenets/55d55479e5bc38c3ae4dfea35f9fbd0e to your computer and use it in GitHub Desktop.
Docker MySQL + phpMyAdmin
This file contains 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
#!/bin/bash | |
NETWORK_NAME=moontech | |
# Create network | |
docker network create ${NETWORK_NAME} | |
# Start MySQL | |
docker run -d \ | |
--name ${NETWORK_NAME}-mysql \ | |
--network ${NETWORK_NAME} \ | |
-e MYSQL_ROOT_PASSWORD="OuPfme45oAM6m6S8lqy4PQfxlYFlCnmPzyaloZ5Zw=" \ | |
-v /opt/mysql:/var/lib/mysql \ | |
-p 3306:3306 \ | |
mysql:8.0.12 | |
# Start phpMyAdmin | |
docker run -d \ | |
--name ${NETWORK_NAME}-phpmyadmin \ | |
--network ${NETWORK_NAME} \ | |
-e PMA_HOST=${NETWORK_NAME}-mysql \ | |
-p 8888:80 \ | |
phpmyadmin/phpmyadmin:edge | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment