Instantly share code, notes, and snippets.

Embed
What would you like to do?
MacOS script to start docker sock for Jetbrains docker integration with Docker for Mac.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>docker.sock</string>
<!-- This file should be ~/Library/LaunchAgents/docker.sock.plist -->
<!-- Start with: launchctl load ~/Library/LaunchAgents/docker.sock.plist -->
<!-- Configure jetbrains with tcp://localhost:2375 -->
<key>OnDemand</key>
<false/>
<key>UserName</key>
<string>aReasonableUserName</string>
<key>GroupName</key>
<string>aReasonableGroup</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/socat</string>
<string>TCP-LISTEN:2375,reuseaddr,fork,bind=localhost</string>
<string>UNIX-CONNECT:/var/run/docker.sock</string>
</array>
</dict>
</plist>
@billylaing

This comment has been minimized.

Owner

billylaing commented Oct 7, 2016

  1. copy this to ~/Library/LaunchAgents/docker.sock.plist
  2. Update the UserName and GroupName
  3. start with launchctl load ~/Library/LaunchAgents/docker.sock.plist
  4. Configure JetBrains Docker API URL with tcp://localhost:2375 (and make sure to leave the Certificates folder blank)
  5. Success! The socket will be restarted whenever you log in.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment