1.
docker run -d -p 2181:2181 -p 2888:2888 -p 3888:3888 --name zk1 --restart always -v /app/zookeeper/volume/data:/data -v /app/volume/zookeeper/volume/datalog:/datalog -e "TZ=Asia/Shanghai" -e "ZOO_MY_ID=1" -e "ZOO_SERVERS=server.1=0.0.0.0:2888:3888 server.2=10.21.14.165:2888:3888 server.3=10.21.14.166:2888:3888" zookeeper:latest
2.
docker run -d -p 2181:2181 -p 2888:2888 -p 3888:3888 --name zk2 --restart always -v /app/zookeeper/volume/data:/data -v /app/zookeeper/volume/datalog:/datalog -e "TZ=Asia/Shanghai" -e "ZOO_MY_ID=2" -e "ZOO_SERVERS=server.1=10.21.14.164:2888:3888 server.2=0.0.0.0:2888:3888 server.3=10.21.14.166:2888:3888" zookeeper:latest
3.
docker run -d -p 2181:2181 -p 2888:2888 -p 3888:3888 --name zk3 --restart always -v /app/zookeeper/volume/data:/data -v /app/zookeeper/volume/datalog:/datalog -e "TZ=Asia/Shanghai" -e "ZOO_MY_ID=3" -e "ZOO_SERVERS=server.1=10.21.14.164:2888:3888 server.2=10.21.14.165:2888:3888 server.3=0.0.0.0:2888:3888" zookeeper:latest
网友评论