Docker build of mongodb with consul agent
docker run -d \
-e CONSUL_JOIN="172.0.0.1 172.0.1.2" \
-e CONSUL_DC="mydc" \
-e CONSUL_SERVICE_NAME="mongo" \
e96tech/mongo:3.4
CONSUL_JOIN
: list of consul servers to join separated by spaceCONSUL_DC
: consul datacenter nameCONSUL_SERVICE_NAME
: service name to register in consul