Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac M2 still cannot connect after configuration #30

Open
sen-cs opened this issue Jul 29, 2023 · 0 comments
Open

Mac M2 still cannot connect after configuration #30

sen-cs opened this issue Jul 29, 2023 · 0 comments

Comments

@sen-cs
Copy link

sen-cs commented Jul 29, 2023

docker-> redis-cluster 7.0.11

$ brew tap wenjunxiao/brew
$ brew install docker-connector

$ docker network ls --filter driver=bridge --format "{{.ID}}" | xargs docker network inspect --format "route {{range .IPAM.Config}}{{.Subnet}}{{end}}" >> "$(brew --prefix)/etc/docker-connector.conf"

sudo brew services start docker-connector
docker run -it -d --restart always --net host --cap-add NET_ADMIN --name connector wenjunxiao/mac-docker-connector

cat /Library/LaunchDaemons/homebrew.mxcl.docker-connector.plist :

<plist version="1.0">
<dict>
	<key>KeepAlive</key>
	<true/>
	<key>Label</key>
	<string>homebrew.mxcl.docker-connector</string>
	<key>LimitLoadToSessionType</key>
	<array>
		<string>Aqua</string>
		<string>Background</string>
		<string>LoginWindow</string>
		<string>StandardIO</string>
		<string>System</string>
	</array>
	<key>ProgramArguments</key>
	<array>
		<string>sudo</string>
		<string>/opt/homebrew/opt/docker-connector/bin/docker-connector</string>
		<string>-config</string>
		<string>etc/docker-connector.conf</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
	<key>StandardErrorPath</key>
	<string>/opt/homebrew/var/log/docker-connector.log</string>
	<key>StandardOutPath</key>
	<string>/opt/homebrew/var/log/docker-connector.log</string>
	<key>WorkingDirectory</key>
	<string>/opt/homebrew</string>
</dict>
</plist>

cat /opt/homebrew//etc/docker-connector.conf:

# addr 192.168.251.1/24
# mtu 1400
# host 127.0.0.1
# port 2511
# route 172.17.0.0/16
# route 172.18.0.0/16
# iptables 172.17.0.0+172.18.0.0
# hosts /etc/hosts .local
# proxy 127.0.0.1:80:80
route 172.17.0.0/16
route 172.20.0.0/16
route 172.19.0.0/16

ping 172.20.0.2
PING 172.20.0.2 (172.20.0.2): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant