Created
March 10, 2015 21:58
-
-
Save mario21ic/7bd4bdee444b6555134d to your computer and use it in GitHub Desktop.
Script to automatically ensure the boot2docker environment is up and running on OSX
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
#!/bin/bash | |
if ! /Applications/VirtualBox.app/Contents/MacOS/VBoxManage list runningvms | grep boot2docker-vm >/dev/null ; then | |
boot2docker start | |
fi | |
if [ "$DOCKER_HOST"=="" ]; then | |
eval $(boot2docker shellinit 2>/dev/null) | |
fi | |
/usr/local/bin/docker $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment