Merge pull request #585 from ljfranklin/PR-docker-machine-source-env

Source docker-machine environment variables rather than hardcoding
pull/591/head
Nils Winkler 2015-10-09 08:32:33 +02:00
commit cb4fbd3983
1 changed files with 6 additions and 6 deletions

View File

@ -1,11 +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
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="$HOME/.docker/machine/machines/dev"
export DOCKER_TLS_VERIFY=1
export DOCKER_MACHINE_NAME="dev"
# check if dev machine is running
docker-machine ls | grep --quiet 'dev.*Running'
if [[ "$?" = "0" ]]; then
eval "$(docker-machine env dev)"
fi
fi