Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Dockerized zookeeper customizeable with env varaibles

It appeared that other zookeeper images cannot make a cluster
or change configuration without bind-mounting config file.

This one can be configured with bind-mounting and
with env variables. This image can even form zookeeper cluster
from env variables only.

Zookeeper is installed from ubuntu repositories on top of 14.04.


Env variables

Single-node super-simple setup:

docker run -d -p 2181:2181 -e ZK_CONFIG=clientPort=2181 -e ZK_ID=1 bobrik/zookeeper


Same as single node, but you should add more configuration to ZK_CONFIG,
some production-ready string could look like this for 3-node cluster:


You should also expose ports 2888 and 3888
in addition to 2181 to make it work.

Each node should be launched with correct ZK_ID.


If you already have configuration file, you should mount it
to container's dir /etc/zookeeper/conf.

It is a great idea to persist data on host filesystem.
To do so, please bind-mount /var/lib/zookeeper for data
and /var/log/zookeeper for logs.

Docker Pull Command
Source Repository