/zookeeper-docker

Primary LanguageXSLTApache License 2.0Apache-2.0

zookeeper-docker

Dockerfile for Apache ZooKeeper

The image is available directly from DockerHub

You can browse the source in GitHub

Usage

Pull the image.

$ docker pull dockerkafka/zookeeper

Start a server.

$  docker run -d --name kafkadocker_zookeeper_1  dockerkafka/zookeeper

Connect to the server with zkshell.

$  docker run --rm -i -t --link kafkadocker_zookeeper_1:kafkadocker_zookeeper_1 dockerkafka/zookeeper zkCli.sh -server kafkadocker_zookeeper_1:2181

Customization

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" .

Useful links

ZooKeeper Administrator's Guide