docker 集群 zk

踩坑 你妈

version: '3.4'

services:
  zoo2:
    image: zookeeper:3.4.14
    restart: always
    hostname: zoo2
    container_name: zoo2
    ports:
    - 2181:2181
    - 2888:2888
    - 3888:3888
    volumes:
    - "/home/data/zookeeper:/data"
    environment:
      ZOO_MY_ID: 2
      ZOO_SERVERS: quorumListenOnAllIPs:true server.1=orizoo1:2888:3888 server.2=0.0.0.0:2888:3888 server.3=orizoo3:2888:3888
    extra_hosts:
    - "orizoo1:172.16.1xx.xx"
    - "orizoo2:172.16.1xx.xx"
    - "orizoo3:172.16.1xx.xx"

失败的原因的是用了最新的docker 镜像 那个东西集群不能设置

你可能感兴趣的:(docker 集群 zk)