Created
February 19, 2015 21:14
-
-
Save donaldgifford/9ffdbaddc53df7cc4059 to your computer and use it in GitHub Desktop.
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 | |
#VARS | |
IMPORT_FILE=Dump20150218.sql | |
echo "Unzipping DB" | |
START=$SECONDS | |
/usr/bin/unzip vg.sql.zip | |
echo "Launching Docker container" | |
/usr/local/bin/docker run -e MYSQL_USER=root -e MYSQL_ROOT_PASSWORD=password -e MYSQL_DATABASE=villagegreen -d -p 3306:3306 --name vg mysql | |
sleep 5 | |
/usr/local/bin/docker ps -a | |
sleep 5 | |
echo "import db file" | |
/usr/local/bin/mysql -u root -ppassword villagegreen -h 192.168.59.103 < $IMPORT_FILE | |
sleep 5 | |
END=$SECONDS | |
MINS=$END/60 | |
echo "$MINS" | |
echo "$DOCKER_HOST" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment