This repository contains the Dockerfile for a Consul image ready to be run in a Docker Swarm (in Swarm mode). The image can be found as an automated build on Docker Hub.
In order to use this image you will need a working Docker Swarm in Swarm mode.
It's helpful (but optional) to create a pair of additional Overlay networks. For example:
$ docker network create --driver overlay --subnet 10.42.2.0/24 --opt encrypted consul-backend
$ docker network create --driver overlay --subnet 10.42.3.0/24 --opt encrypted consul-client
Then, create the docker service:
$ docker service create --mode global \
--name consul \
--network consul-backend \
--network consul-client \
--env "CONSUL_BIND_INTERFACE=eth0" \
--env "CONSUL_CLIENT_INTERFACE=eth2" \
sh4rk/consul-swarm
You can use all further customization options as described by the official image's docs.
There is no manual bootstrapping required after this step. The containers will automagically discover each other and join a cluster.
git checkout -b my-new-featuregit commit -am 'Add some feature'git push origin my-new-featureThis project is licensed under the MIT License. See LICENSE for details.
Content type
Image
Digest
Size
13.4 MB
Last updated
over 8 years ago
docker pull sh4rk/consul-swarm