Skip to content

Instantly share code, notes, and snippets.

@tym-xqo
Last active May 10, 2016 19:16
Show Gist options
  • Save tym-xqo/08b230a3fd2062bb5220cceb43aaf879 to your computer and use it in GitHub Desktop.
Save tym-xqo/08b230a3fd2062bb5220cceb43aaf879 to your computer and use it in GitHub Desktop.
docker-machine up and env set (good for adding to .bashrc)
#!/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