Last active
August 29, 2015 13:57
-
-
Save clairvy/9719817 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# docker | |
if whence -p boot2docker 2>&1 > /dev/null; then | |
alias boot2dockerenv="boot2docker up | awk '/export/{print \$2}'" | |
alias boot2dockerhost="boot2docker up | awk -F= '/export/{print \$2}'" | |
alias boot2dockerstatus="boot2docker status | awk '{print \$5}'" | |
if whence -p docker 2>&1 > /dev/null; then | |
function docker { | |
if [[ x"`boot2dockerstatus`" == x"running." ]]; then | |
command docker --host="`boot2dockerhost`" "$@" | |
else | |
command docker "$@" | |
fi | |
} | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment