Skip to content

Instantly share code, notes, and snippets.

@orangain
Forked from krak3n/.zshrc
Last active January 22, 2016 02:46
Show Gist options
  • Save orangain/5f74bf388f66778f0e47 to your computer and use it in GitHub Desktop.
Save orangain/5f74bf388f66778f0e47 to your computer and use it in GitHub Desktop.
Mac OS X script to automatically start boot2docker on system boot
curl https://gist.github.com/orangain/5f74bf388f66778f0e47/raw/com.docker.boot2docker.plist -o ~/Library/LaunchAgents/com.docker.boot2docker.plist
launchctl load ~/Library/LaunchAgents/com.docker.boot2docker.plist
echo '$(boot2docker shellinit)' >> ~/.bash_profile
<?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>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>Label</key>
<string>com.docker.boot2docker</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/boot2docker</string>
<string>up</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/usr/local/var/log/boot2docker.err.log</string>
<key>StandardOutPath</key>
<string>/usr/local/var/log/boot2docker.out.log</string>
</dict>
</plist>
@if-kenn
Copy link

if-kenn commented May 11, 2015

In order to have this work on 10.10.3 I had to remove these lines:

    <key>WorkingDirectory</key>
    <string>~</string>

@orangain
Copy link
Author

@if-kenn Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment