-
Download
com.docker.vm.plist
and save it into~/Library/LaunchAgents/
.$ curl -sL https://git.io/vz2Y9 -o ~/Library/LaunchAgents/com.docker.vm.plist
-
(Optional) Change
<string>default</string>
line if you are using different name of docker machine. -
Run:
$ launchctl load ~/Library/LaunchAgents/com.docker.vm.plist
-
(Optional) Add output of
docker-machine env default
into your.bash_profile
.
Last active
January 22, 2016 04:09
-
-
Save orangain/6964a62111e0dc3ff0d2 to your computer and use it in GitHub Desktop.
Mac OS X script to start Docker VM automatically on system boot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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.vm</string> | |
<key>EnvironmentVariables</key> | |
<dict> | |
<key>PATH</key> | |
<string>/usr/local/bin:/usr/bin:/bin</string> | |
</dict> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/docker-machine</string> | |
<string>start</string> | |
<string>default</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>StandardErrorPath</key> | |
<string>/usr/local/var/log/docker-vm.err.log</string> | |
<key>StandardOutPath</key> | |
<string>/usr/local/var/log/docker-vm.out.log</string> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment