Files
bash-it/plugins/available/docker-machine.plugin.bash
Bill Moritz d8ce333ae7 Add Support for different docker-machine VM names
Add the variable BASH_IT_DOCKER_MACHINE to set a name other than 'dev' as
Virtual Machine name.
2015-12-06 09:55:19 -05:00

14 lines
474 B
Bash

cite about-plugin
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'
if [[ `uname -s` == "Darwin" ]]; then
# check if dev machine is running
docker-machine ls | grep --quiet "$BASH_IT_DOCKER_MACHINE.*Running"
if [[ "$?" = "0" ]]; then
eval "$(docker-machine env $BASH_IT_DOCKER_MACHINE)"
fi
fi