Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 3.33 KB

README.md

File metadata and controls

59 lines (40 loc) · 3.33 KB

alpine-consul-base

A Docker image designed for extending from when you need to run Consul, based on Alpine Linux. This image belongs to a suite of images documented here.

This image is designed to be extended from, with specific services added to it via Consul, along with appropriate health checks.

Image size is ~49.4 MB.

Features

This image features:

Versions

See VERSIONS.md for image contents.

Usage

To use this image include FROM smebberson/alpine-consul-base at the top of your Dockerfile, or simply docker run --name consul-base smebberson/alpine-consul-base.

This container has been setup to automatically connect to a Consul cluster, created with a service name of consul. Read more about it here.

consul-template is automatically started if templates are available.

Customisation

To use consul-template:

  1. Add your templates to root/etc/consul-template/templates/my-service/.
  2. Make consul-template configuration aware of your templates by adding a configuration file in root/etc/consul-template/conf.d/my-service (use sub folders to make VOLUME /etc/consul-template/templates/my-service possible).
  3. In your Dockerfile be sure to run mkfifo /etc/services.d/my-service/supervise/control and chmod g+w /etc/services.d/my-service/supervise/control in order to make it possible for consul-template to restart the service if needed.

Example

An example of using this image can be found in examples/user-consul-nginx-nodejs.