1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:50 +02:00
dockerfiles/zookeeper
2021-11-26 15:50:32 +08:00
..
arm upgrade zookeeper-arm to 3.4.12 2018-07-22 20:14:52 +08:00
docker-compose.yml add trino 2021-11-26 15:50:32 +08:00
README.md update kafka 2021-11-26 14:58:00 +08:00
zookeeper.service add zookeeper.service 2018-01-15 20:43:54 +08:00

zookeeper

Apache ZooKeeper is an effort to develop and maintain an open-source server which enables highly reliable distributed coordination.

docker-compose.yml

version: "3.8"
services:
  zookeeper:
    image: zookeeper
    ports:
      - "2181:2181"
    volumes:
      - ./data/data:/data
      - ./data/datalog:/datalog
      - ./data/logs:/logs
    environment:
      - ZOO_LOG4J_PROP=INFO,ROLLINGFILE
      - ZOO_STANDALONE_ENABLED=true
    restart: unless-stopped

Standalone Mode

$ docker-compose up -d

$ docker-compose exec zookeeper cat /conf/zoo.cfg

$ docker-compose exec zookeeper zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /conf/zoo.cfg
Client port found: 2181. Client address: localhost.
Mode: standalone

$ docker-compose exec zookeeper zkCli.sh
>>> help
>>> create /hello world
>>> get /hello
>>> delete /hello
>>> quit

Click this to learn more.

Cluster Mode

See: https://github.com/vimagick/dockerfiles/tree/master/kafka