smebberson/consul
An Ubuntu 14.04 based image, featuring s6 process management and consul.
117
An image for using consul within Docker containers.
Yet another container for running Consul?
Yes, as this one is built from my Ubuntu-based Docker image that contains s6 for process management.
Aren't you only supposed to run one process per container?
Well yes and no... the following are good examples of when multiple processes within one container might be necessary:
To use this image include FROM smebberson/consul
at the top of your Dockerfile
, or simply docker run --name consul smebberson/consul
.
By default, Consul has been configured with:
{
"bootstrap_expect": 1,
"server": true,
"node_name": "agent-bootstrapped",
"data_dir": "/data"
}
This setup serves the purpose of a single Consul agent running on a host, mainly for testing. This isn't the recommended scenario, with 3 to 5 total servers per data centre being preferred. However, you can easily customise this by providing your own config.json
file as discussed below.
Although easily customisable, this image has been designed to run Consul in server mode (without the web ui). If you'd like an image with Consul's web ui, refer to smebberson/consul-ui. If you'd like an image purpose-built to be run as an Consul agent.
This container comes setup as follows:
All configuration has been defined in the root/etc/consul.d/bootstrap/config.json
file (relative to this directory).
To customise configuration for consul
, replace the file at root/etc/consul.d/bootstrap/config.json
with your own configuration.
To customise the start script for consul
, replace the file at root/etc/s6/consul/run
with your own start script.
docker pull smebberson/consul