标签:-- add zookeeper run cluster ntp nal color client
下载镜像
docker pull garland/zookeeper
搭建:
docker run -d --name=zk1 --net=host -e SERVER_ID=1 -e ADDITIONAL_ZOOKEEPER_1=server.1=localhost:2888:3888 -e ADDITIONAL_ZOOKEEPER_2=server.2=localhost:2889:3889 -e ADDITIONAL_ZOOKEEPER_3=server.3=localhost:2890:3890 -e ADDITIONAL_ZOOKEEPER_4=clientPort=2181 garland/zookeeper docker run -d --name=zk2 --net=host -e SERVER_ID=2 -e ADDITIONAL_ZOOKEEPER_1=server.1=localhost:2888:3888 -e ADDITIONAL_ZOOKEEPER_2=server.2=localhost:2889:3889 -e ADDITIONAL_ZOOKEEPER_3=server.3=localhost:2890:3890 -e ADDITIONAL_ZOOKEEPER_4=clientPort=2182 garland/zookeeper docker run -d --name=zk3 --net=host -e SERVER_ID=3 -e ADDITIONAL_ZOOKEEPER_1=server.1=localhost:2888:3888 -e ADDITIONAL_ZOOKEEPER_2=server.2=localhost:2889:3889 -e ADDITIONAL_ZOOKEEPER_3=server.3=localhost:2890:3890 -e ADDITIONAL_ZOOKEEPER_4=clientPort=2183 garland/zookeeper
文档:
https://github.com/denverdino/aliyungo/wiki/Zookeeper-cluster-with-Docker
Zookeeper:Docker环境下搭建Zookeeper集群
标签:-- add zookeeper run cluster ntp nal color client
原文地址:http://www.cnblogs.com/xmai/p/7493163.html