Merge pull request #585 from ljfranklin/PR-docker-machine-source-env
Source docker-machine environment variables rather than hardcodingpull/591/head
commit
cb4fbd3983
|
|
@ -1,11 +1,11 @@
|
||||||
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'
|
||||||
|
|
||||||
# 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'
|
||||||
# or its configured for a different IP
|
|
||||||
if [[ `uname -s` == "Darwin" ]]; then
|
if [[ `uname -s` == "Darwin" ]]; then
|
||||||
export DOCKER_HOST="tcp://192.168.99.100:2376"
|
# check if dev machine is running
|
||||||
export DOCKER_CERT_PATH="$HOME/.docker/machine/machines/dev"
|
docker-machine ls | grep --quiet 'dev.*Running'
|
||||||
export DOCKER_TLS_VERIFY=1
|
if [[ "$?" = "0" ]]; then
|
||||||
export DOCKER_MACHINE_NAME="dev"
|
eval "$(docker-machine env dev)"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue