ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them, which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed.
$ docker run -d --name some-zookeeper-name --hostname some-zookeeper-hostname-N image:tag
Where:
some-zookeeper-name is name you want to assign to your containersome-zookeeper-hostname-N is container hostname. N stands for instance number (0,1,...,N).image is Docker image nametag is Docker image versionTZ
This is optional variable. It specifes timezone. Default value is Europe/Zagreb.
This image includes EXPOSE 2181 2888 3888 8080 (the Zookeeper client port, follower port, election port, AdminServer port)
To save Zookeeper data mount container path /var/lib/zookeeper to host path.
$ -v some-host-path:/var/lib/zookeeper
Content type
Image
Digest
Size
216.4 MB
Last updated
about 5 years ago
docker pull dalmatialab/zookeeper