Last active
March 12, 2025 14:56
-
-
Save djangofan/d202ff132ca72ba4918d60846ec1fe76 to your computer and use it in GitHub Desktop.
socat daemon on OSX for Docker
This file contains hidden or 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
#!/bin/bash | |
#brew install socat | |
# socat TCP-LISTEN:2377,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock | |
#file: docker.socat_listener | |
# <?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>Label</key> | |
# <string>docker.socat_listener</string> | |
# <key>Disabled</key> | |
# <false/> | |
# <key>RunAtLoad</key> | |
# <true/> | |
# <key>KeepAlive</key> | |
# <true/> | |
# <key>ProgramArguments</key> | |
# <array> | |
# <string>/usr/local/bin/socat</string> | |
# <string>-d</string> | |
# <string>TCP-LISTEN:2377,reuseaddr,fork</string> | |
# <string>UNIX:/var/run/docker.sock</string> | |
# </array> | |
# <key>StandardErrorPath</key> | |
# <string>/Library/Logs/socat_docker.log</string> | |
# <key>StandardOutPath</key> | |
# <string>/Library/Logs/socat_docker.log</string> | |
# <key>StartInterval</key> | |
# <integer>30</integer> | |
# </dict> | |
# </plist> | |
# copy plist file to LaunchDaemons folder | |
#cd /Library/LaunchDaemons | |
#sudo chown root:wheel docker.socat_listener.plist | |
#sudo launchctl load se.ivankrizsan.socat_launcher.plist | |
# verify service with url: http://127.0.0.1:2377/version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solved the problem: I added the range-parameter to my socat arguments in launch daemon script. This leads to an error! Don't use the range-parameter in TCP-LISTEN on Mac OS!