Merge pull request #623 from billmoritz/docker_machine_name

Add Support for different docker-machine VM names
pull/624/head
Nils Winkler 2015-12-07 08:29:41 +01:00
commit af6e81ba43
1 changed files with 4 additions and 2 deletions

View File

@ -1,11 +1,13 @@
cite about-plugin cite about-plugin
about-plugin 'Helpers to get Docker setup correctly for docker-machine' about-plugin 'Helpers to get Docker setup correctly for docker-machine'
[ -z ${BASH_IT_DOCKER_MACHINE+x} ] && BASH_IT_DOCKER_MACHINE='dev'
# Note, this might need to be different if you use a machine other than 'dev' # Note, this might need to be different if you use a machine other than 'dev'
if [[ `uname -s` == "Darwin" ]]; then if [[ `uname -s` == "Darwin" ]]; then
# check if dev machine is running # check if dev machine is running
docker-machine ls | grep --quiet 'dev.*Running' docker-machine ls | grep --quiet "$BASH_IT_DOCKER_MACHINE.*Running"
if [[ "$?" = "0" ]]; then if [[ "$?" = "0" ]]; then
eval "$(docker-machine env dev)" eval "$(docker-machine env $BASH_IT_DOCKER_MACHINE)"
fi fi
fi fi