Created
July 25, 2014 14:32
-
-
Save krak3n/0f7fe4c3c5828767ec5b to your computer and use it in GitHub Desktop.
OSX boot2docker auto start & auto export DOCKER_HOST
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
# Add this to your bashrc or zshrc or whatever | |
port=`boot2docker info | awk -F=":" -v RS="," '$1~/"DockerPort"/ {print}' | sed 's/\"//g' | sed 's/DockerPort://'` | |
export DOCKER_HOST="tcp://:${port}" |
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.boot2docker</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/boot2docker up</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>WorkingDirectory</key> | |
<string>/Users/chrisreeves</string> | |
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment