Skip to content

Instantly share code, notes, and snippets.

@ericboehs
Created March 10, 2016 17:48
Show Gist options
  • Save ericboehs/45e2f2e349249b8253a2 to your computer and use it in GitHub Desktop.
Save ericboehs/45e2f2e349249b8253a2 to your computer and use it in GitHub Desktop.
Docker Machine Launch Agent
<?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>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin</string>
</dict>
<key>Label</key>
<string>com.docker.machine.default</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/docker-machine</string>
<string>start</string>
<string>default</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
@ericboehs
Copy link
Author

ericboehs commented Mar 10, 2016

To install run:

(cd ~/Library/LaunchAgents; curl -L https://git.io/vKh4l > com.docker.machine.default.plist; launchctl load com.docker.machine.default.plist)

You'll probably also want to add eval $(docker-machine env) to your shell profile, e.g.:

echo 'eval $(docker-machine env)' >> ~/.zshrc

LaunchAgent from Docker's getting started.

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