Skip to content

Instantly share code, notes, and snippets.

@thenets
Last active October 17, 2018 15:52
Show Gist options
  • Save thenets/55d55479e5bc38c3ae4dfea35f9fbd0e to your computer and use it in GitHub Desktop.
Save thenets/55d55479e5bc38c3ae4dfea35f9fbd0e to your computer and use it in GitHub Desktop.
Docker MySQL + phpMyAdmin
#!/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