Created
August 17, 2015 17:09
-
-
Save parabuzzle/db0f2338899331c3afa9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function duse { | |
_ENV=`docker-machine env $@` | |
if [ $? -ne 0 ]; then | |
printf "$_ENV" | |
return 1 | |
elif [ -z "$1" ]; then | |
printf "$_ENV" | |
else | |
eval $_ENV | |
docker-machine active $1 > /dev/null 2> /dev/null | |
fi | |
echo "Switched to $DOCKER_HOST docker environment." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment