Created
August 21, 2015 19:07
-
-
Save EdHurtig/c1bd387dcf7c9caea132 to your computer and use it in GitHub Desktop.
Overrides the docker command and ensures that the default docker-machine is running before running the actual docker command
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 docker() { | |
if [ `docker-machine status default` != "Running" ]; then | |
echo "WARNING! Starting Default Docker Machine." | |
docker-machine start default | logger | |
eval "$(docker-machine env default)" | |
fi | |
command docker $@ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment