Skip to content

Instantly share code, notes, and snippets.

@mario21ic
Created September 20, 2015 22:14
Show Gist options
  • Save mario21ic/60275dfdfeaebf5d4ba1 to your computer and use it in GitHub Desktop.
Save mario21ic/60275dfdfeaebf5d4ba1 to your computer and use it in GitHub Desktop.
Docker on Mac
#!/bin/bash
MACHINE='dev'
if ! /Applications/VirtualBox.app/Contents/MacOS/VBoxManage list runningvms | grep $MACHINE >/dev/null ; then
docker-machine start $MACHINE
fi
if [ "$DOCKER_HOST"=="" ]; then
eval $(docker-machine env $MACHINE 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