Skip to content

Instantly share code, notes, and snippets.

@caffeineflo
Last active August 29, 2015 14:03
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caffeineflo/e31026cfe74922e222d1 to your computer and use it in GitHub Desktop.
Save caffeineflo/e31026cfe74922e222d1 to your computer and use it in GitHub Desktop.
Autoboot Boot2Docker on System Startup

I came across this when I found several solutions that didn't work for me. They all had there very own problems, they either had a debug option in it (which I found guilty of not starting my job after several hours of debugging) or other unnecessary keys.

To make this plist work, you should may create the corresponding log files before and give them the necessary permissions (770 worked for me, though it's maybe too much).

  1. Create the plist under ~/Library/LaunchAgents/com.user.boot2docker.plist
  2. run launchctl load ~/Library/LaunchAgents/com.user.boot2docker.plist
<?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.user.boot2docker</string>
<key>StandardOutPath</key>
<string>/var/log/boot2docker.log</string>
<key>StandardErrorPath</key>
<string>/var/log/boot2docker.err</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/boot2docker</string>
<string>up</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment