Created
September 26, 2014 18:33
-
-
Save joshuacalloway/51cc36160a009d3b01dc to your computer and use it in GitHub Desktop.
simple docker copy directory doesn't work
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
mysqlidfull=$(docker run -e MYSQL_ROOT_PASSWORD=password -d mysql) | |
mysqlid=${mysqlidfull:0:4} | |
mysql=$(docker inspect $mysqlid | grep "Name" | grep "/" | sed 's/^.*\///g' | sed 's/".*$//g') | |
echo "mysql: ${mysql}" | |
docker cp ${mysql}:/var/lib/mysql . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment