Last active
May 10, 2016 19:16
-
-
Save tym-xqo/08b230a3fd2062bb5220cceb43aaf879 to your computer and use it in GitHub Desktop.
docker-machine up and env set (good for adding to .bashrc)
This file contains hidden or 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 | |
if [ $(docker-machine status default) != 'Running' ]; then | |
echo "start docker VM now [y/n]?" | |
read -n 1 start | |
if [ "$start" = "n" ]; then | |
: | |
else | |
docker-machine start default | |
eval $(docker-machine env default) | |
fi | |
else | |
eval $(docker-machine env default) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment