Public | Automated Build

Last pushed: 2 years ago
Short Description
Proxy services registered with Consul via Nginx
Full Description


The front-end proxy for all the services, backed by Consul for
service registry.

NOTE: Consul service needs to be separately started

The container contains the following packages:

  • Nginx (1.9)
  • Consul-Template (0.14.0)


  • latest, 0.2, 0.2.0 (Dockerfile)
  • 0.1, 0.1.4 (based on Consul Template 0.13.0)


Pull the docker image from Docker hub as:

> docker pull activatedgeek/nginx-consul

The following environment variables are configurable:

  • CONSUL_HOST: complete URL to Consul Agent/Server including
    port (default =, passed to the -consul CLI
  • CONSUL_LOG_LEVEL: logging level for Consul (default = info)
    , passed to the -log-level CLI argument
  • CONSUL_TEMPLATE_CONFIG: path to the Hashicorp Configuration
    which contains list of all templates to be rendered (default =

The image provides a /templates mount point for starters.

As an example, the ./consul-template folder has been provided,
which can be mounted as:

> docker run -d -p 8080:80 \
    -v "/path/to/consul-template:/templates" \
    --name test-nginx-consul \
    --dns= \

Now point your browser to,


to see the output, where service_name points to the IP address
of the host running this docker container.

NOTE: docker-machine users will need to point to
the correct docker host instead of localhost.


To build the latest image from source, run

> make latest
Docker Pull Command