Dockerfile for Apache ZooKeeper
The image is available directly from DockerHub
You can browse the source in GitHub
$ docker pull dockerkafka/zookeeper
$ docker run -d --name kafkadocker_zookeeper_1 dockerkafka/zookeeper
$ docker run --rm -i -t --link kafkadocker_zookeeper_1:kafkadocker_zookeeper_1 dockerkafka/zookeeper zkCli.sh -server kafkadocker_zookeeper_1:2181
Check out this repository, you will found the default Zookeeper configuration files under image/conf.
Start the container with the following line, so now you can modify the config in your host, and then start the server.
$ docker run -it --rm --volume `pwd`/image/conf:/opt/zookeeper-3.4.6/conf kafkadocker/zookeeper /bin/bash
After you finished the customization & testing of the config changes, build your own image.
$ docker build --tag="my-image" .