Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

intento/zookeeper-docker-swarm

 
 

Repository files navigation

zookeeper-docker-swarm

Available Tags:

What is Zookeeper with Docker Swarm?

This is an extension to the official Zookeeper Docker image. This image lets you configure Zookeeper in replicated mode as a single docker service, instead of creating three (or more) different services for each one of your nodes as proposed by the official image.

You will need a docker overlay network and an environment variable named SERVICE_NAME that equals the docker service name, when creating the swarm service. Using this variable, each container will be able to discover the rest ZooKeeper nodes in their network.

An example of the docker network create is:

docker network create \
    --driver overlay zookeeper-net

An example of the docker service create is:

docker service create \
    --env "REPLICAS=3" \
    --env "SERVICE_NAME=zookeeper" \
    --name zookeeper \
    --network zookeeper-net \
    --publish 2181:2181 \
    --replicas=3 \
    itsaur/zookeeper-replicated

Releases

No releases published

Packages

No packages published

Languages

  • Shell 90.4%
  • Dockerfile 9.6%