Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ivoputzer/6c9dd69e3b875fce7c6a to your computer and use it in GitHub Desktop.
Save ivoputzer/6c9dd69e3b875fce7c6a to your computer and use it in GitHub Desktop.
run boot2docker on system startup - Mac OSX - Yosemite
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.docker.boot2docker</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/boot2docker</string>
<string>up</string>
</array>
<key>KeepAlive</key>
<true/>
</dict>
</plist>

Add to .zshrc or .bashrc so the environment settings get loaded automatically!

eval "$(boot2docker shellinit 2>/dev/null)"

Note: It's recommended but not necessary to have the com.docker.boot2docker.plist file under root ownership as per http://launchd.info

install

    launchctl load ~/Library/LaunchAgents/com.docker.boot2docker.plist

manually start

    launchctl start com.docker.boot2docker.plist

assure process is running

    ps aux | grep boot2docker

uninstall

    launchctl load com.docker.boot2docker.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment