Skip to content

Instantly share code, notes, and snippets.

@mario21ic
Created March 10, 2015 21:58
Show Gist options
  • Save mario21ic/7bd4bdee444b6555134d to your computer and use it in GitHub Desktop.
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
#!/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