Check whether docker-machine dev is running before configuring env variables
Signed-off-by: Lyle Franklin <lfranklin@pivotal.io>
This commit is contained in:
committed by
Lyle Franklin
parent
9c23a15075
commit
e704bd72f3
@@ -1,8 +1,11 @@
|
||||
cite about-plugin
|
||||
about-plugin 'Helpers to get Docker setup correctly for docker-machine'
|
||||
|
||||
# Note, this might need to be different if you use a machine other than 'dev',
|
||||
# or its configured for a different IP
|
||||
# Note, this might need to be different if you use a machine other than 'dev'
|
||||
if [[ `uname -s` == "Darwin" ]]; then
|
||||
eval "$(docker-machine env dev)"
|
||||
# check if dev machine is running
|
||||
docker-machine ls | grep --quiet 'dev.*Running'
|
||||
if [[ "$?" = "0" ]]; then
|
||||
eval "$(docker-machine env dev)"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user