Docker for Mac Remote API with Socat
cd /Library/LaunchDaemons
sudo vi kr.co.devlog.socat.docker.plist
<?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>kr.co.devlog.socat.docker</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:2376,range=127.0.0.1/32,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>
sudo launchctl load kr.co.devlog.socat.docker.plist
sudo vi kr.co.devlog.socat.docker.plist
<?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>kr.co.devlog.socat.docker</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:2376,range=127.0.0.1/32,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>
sudo launchctl load kr.co.devlog.socat.docker.plist
댓글
댓글 쓰기