docker 容器配置redis集群
docker network create --subnet=172.20.0.0/24 docker-br0
docker run -dit --name=redis-node1 --network docker-br0 -v /data/redis-data/node1:/data -p 7379:6379 redis --cluster-enabled yes --cluster-config-file nodes-node-1.conf
docker run -dit --name=redis-node2 --network docker-br0 -v /data/redis-data/node2:/data -p 7380:6379 redis --cluster-enabled yes --cluster-config-file nodes-node-2.conf
docker run -dit --name=redis-node3 --network docker-br0 -v /data/redis-data/node3:/data -p 7381:6379 redis --cluster-enabled yes --cluster-config-file nodes-node-3.conf
docker inspect redis-node1 获取 IP 172.18.0.2
docker inspect redis-node2 获取 IP 172.18.0.3
docker inspect redis-node3 获取 IP 172.18.0.4
redis-cli --cluster create --cluster-replicas 0 172.20.0.2:6379 172.20.0.3:6379 172.20.0.4:6379
Windows连接虚拟机里面的Docker容器ip
https://blog.csdn.net/Horsdy123/article/details/108582185