Skip to content

Instantly share code, notes, and snippets.

@3mkay
Forked from krak3n/.zshrc
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3mkay/a6c96b2d673af24d3b47 to your computer and use it in GitHub Desktop.
Save 3mkay/a6c96b2d673af24d3b47 to your computer and use it in GitHub Desktop.
# 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}"
<?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