Last active
February 7, 2024 09:11
-
-
Save jpcaparas/61f8570d39ef4f3e78d7a09360278933 to your computer and use it in GitHub Desktop.
Quickly spin up a MySQL container that's bind-mounted to a host volume and include an accompanying PHPMyAdmin UI
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 | |
# Some args are OrbStack-specific | |
# To enter the instance, run: | |
# docker exec -it kiwinoy_mysql8 mysql -u root -p | |
docker run \ | |
-d \ | |
--rm \ | |
--name kiwinoy_mysql8 \ | |
-p 3307:3306 \ | |
-v kiwinoy_mysql8:/var/lib/mysql \ | |
-e MYSQL_ROOT_PASSWORD=secret \ | |
-d mysql:8 | |
docker run \ | |
-d \ | |
--rm \ | |
--name kiwinoy_pma \ | |
--link kiwinoy_mysql8:db \ | |
-l dev.orbstack.domains=pma.local \ | |
-p 8080:80 \ | |
phpmyadmin/phpmyadmin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment