Skip to content

Latest commit

 

History

History
71 lines (47 loc) · 2.51 KB

README.md

File metadata and controls

71 lines (47 loc) · 2.51 KB

alpine-confd

A Docker image for running confd, based on Alpine Linux. This image belongs to a suite of images documented here.

Features

This image features:

Versions

See VERSIONS.md for image contents.

Usage

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

By default, this container doesn't actually do anything other than provide the building blocks for a Docker container that includes configuration management via confd.

A good pattern to running confd is to take advantage of container initialization hooks, and run confd before any service starts, creating the necessary configuration files.

#!/usr/bin/with-contenv sh

# Setup the templates.
confd -onetime -backend env

Template resource configs

Add your template resource config files in /etc/confd/conf.d/. For example:

# /etc/confd/conf.d/test.toml

[template]
src = "test.conf.tmpl"
dest = "/tmp/test.conf"

Source templates

Add your source templates in /etc/confd/templates. For example:

# this is a test only
test_variable = "{{getenv "test_variable"}}"

Example

An example of using this image can be found in examples/user-confd.