A base image to build your own Fluentd Container.
- Create a
Gemfilewith fluentd and any plugins you need.
source "https://rubygems.org"
gem "fluentd", "0.14.13"
gem "fluent-plugin-systemd", "~> 0.2"-
run
bundle installto create aGemfile.lock, thus locking the exact version of all plugins and thier dependencies. -
Create a
Dockerfile
FROM quay.io/assemblyline/fluentd:1.0-onbuild
COPY config/* /etc/fluent/conf.d/The ONBUILD instructions copy Gemfile and Gemfile.lock into your image,
and installs everything correctly.
Then its up to you to copy your configuration into place. Or provide it at runtime.
The base image ships with a /etc/fluent/fluent.conf file that loads config from /etc/fluent/conf.d/. You may want to copy/mount multiple config files there. Or if your needs are simple you could just overide /etc/fluent/fluent.conf.
docker build && docker pushFTW