Skip to content

Instantly share code, notes, and snippets.

@adrienthebo
Created October 8, 2018 16:19
Show Gist options
  • Save adrienthebo/8d543a8856ca0c4c64f9f55d844d515f to your computer and use it in GitHub Desktop.
Save adrienthebo/8d543a8856ca0c4c64f9f55d844d515f to your computer and use it in GitHub Desktop.
function docker() {
command docker info 2>&- 1>&-
if [[ $? -eq 1 ]]; then
echo "-- Loading docker configuration - this may take a few seconds..."
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