# The number of milliseconds of each ticktickTime=2000# The number of ticks that the initial# synchronization phase can takeinitLimit=10# The number of ticks that can pass between# sending a request and getting an acknowledgementsyncLimit=5# the directory where the snapshot is stored.# do not use /tmp for storage, /tmp here is just# example sakes.dataDir=/tmp/zookeeper# the port at which the clients will connectclientPort=2181server.1=zoo1:2888:3888server.2=zoo2:2888:3888server.3=zoo2:2888:3888

And the containers are started up with the help of docker-compose with the following

docker-compose.yml configuration:

version: '2'

services:

zoomaster:

image: ewer/zookeeper

ports:

- "2181:2181"

expose:

- "2181"

- "2888"

- "3888"

labels:

zookeeper: master

volumes:

- /c/Users/name/docker_volumes/zoo1:/tmp/zookeeper

container_name: zoo1

zooclient2:

image: ewer/zookeeper

ports:

- "2182:2181"

expose:

- "2181"

- "2888"

- "3888"

labels:

zookeeper: master

volumes:

- /c/Users/name/docker_volumes/zoo2:/tmp/zookeeper

container_name: zoo2

zooclient3:

image: ewer/zookeeper

ports:

- "2183:2181"

expose:

- "2181"

- "2888"

- "3888"

labels:

zookeeper: master

volumes:

- /c/Users/name/docker_volumes/zoo3:/tmp/zookeeper

container_name: zoo3

As you can see in the volumes, per default only the homedirectory is mounted into the

boot2docker Image of the docker engine, using the cygwin path

A precondition zookeeper needs is a file called myid in /tmp/zookeeper with sequential numbers.

After creating a docker machine on windows with

docker-machine.exe create java

and setting the environment by the help of

docker-machine.exe env java

docker-compose up -d

After installing a local version of zookeeper to get the commandline client the first test could be

done:

The IP-Adress is the one from the docker-machine ( retrieved by docker-machine.exe env java )

and the port is sequentially configured for each container in the docker-compose.yml.