Last active
August 31, 2018 14:32
-
-
Save usagizmo/03dd9c14ca13a917306ea44fc2874590 to your computer and use it in GitHub Desktop.
Execute docker bash and save database sample
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
{ | |
"scripts": { | |
"save": "did=`docker ps | awk '$2==\"mysql:5.7\" { print $1 }'` && docker exec -it $did sh -c 'mysqldump wordpress -u wordpress -pwordpress 2> /dev/null' > ./docker-entrypoint-initdb.d/install_wordpress.sql", | |
"bash": "did=`docker ps | awk '$2==\"wordpress:latest\" { print $1 }'` && docker exec -it $did bash" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment