拉取 zookeeper 官方镜像
更多zk版本请参见 https://hub.docker.com/_/zookeeper tag
docker pull zookeeper:3.6.3
快速启动
docker run -it --restart always --name zookeeper -d --network host zookeeper:3.6.3
检测状态
docker exec -it zookeeper ./bin/zkServer.sh status
出现以下类似消息即为成功
ZooKeeper JMX enabled by default
Using config: /conf/zoo.cfg
Client port found: 2181. Client address: localhost. Client SSL: false.
Mode: standalone