其他分享
首页 > 其他分享> > docker一键部署zookeeper

docker一键部署zookeeper

作者:互联网

version: '3.1'

services:
zoo1:
image: zookeeper:3.4.11
restart: always
hostname: zoo1
container_name: zookeeper_1
#domainname:
ports:
- 2181:2181
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=zoo1:2888:3888 server.2=zoo2:2888:3888 server.3=zoo3:2888:3888

zoo2:
image: zookeeper:3.4.11
restart: always
hostname: zoo2
container_name: zookeeper_2
ports:
- 2182:2181
environment:
ZOO_MY_ID: 2
ZOO_SERVERS: server.1=zoo1:2888:3888 server.2=zoo2:2888:3888 server.3=zoo3:2888:3888

zoo3:
image: zookeeper:3.4.11
restart: always
hostname: zoo3
container_name: zookeeper_3
ports:
- 2183:2181
environment:
ZOO_MY_ID: 3
ZOO_SERVERS: server.1=zoo1:2888:3888 server.2=zoo2:2888:3888 server.3=zoo3:2888:3888

标签:2888,zookeeper,一键,3888,ZOO,zoo1,zoo2,docker
来源: https://www.cnblogs.com/zuokun/p/11008643.html