码迷,mamicode.com
首页 > 其他好文 > 详细

Zookeeper:Docker环境下搭建Zookeeper集群

时间:2017-09-08 11:47:38      阅读:644      评论:0      收藏:0      [点我收藏+]

标签:--   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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!