Using A Docker Zookeeper Image
This is a simple example that sets up a five server Zookeeper cluster.
On a separate terminal, you can use the following line to connect to the five server Zookeeper instance:
docker-compose run --rm zkcli -server zookeeper3
There is an intro to zkcli here: Connecting To ZooKeeper.