docker 容器配置redis集群
作者:互联网
docker network create --driver bridge docker_bridge docker run -dit --name=redis-node1 --network docker_bridge -v /data/redis-data/node1:/data -p 7379:7379 redis --cluster-enabled yes --cluster-config-file nodes-node-1.conf docker run -dit --name=redis-node2 --network docker_bridge -v /data/redis-data/node1:/data -p 7380:7380 redis --cluster-enabled yes --cluster-config-file nodes-node-2.conf docker run -dit --name=redis-node3 --network docker_bridge -v /data/redis-data/node1:/data -p 7381:7381 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.18.0.2:6379 172.18.0.3:6379 172.18.0.4:6379
标签:--,redis,cluster,集群,172.18,docker,data 来源: https://www.cnblogs.com/gouge/p/14312370.html