Public Repository

Last pushed: 2 years ago
Short Description
Fluentd with Elasticsearch and Kafka plugins
Full Description

FROM ubuntu:latest

Taken from Jimmi Dyson's Dockerfile

MAINTAINER Bill Jorgensen

Ensure there are enough file descriptors for running Fluentd

RUN ulimit -n 65536

Disable prompts from apt.

ENV DEBIAN_FRONTEND noninteractive

Install prerequisites.

RUN apt-get update && \
apt-get install -y -q curl make g++ git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/ /tmp/ /var/tmp/*

Install Fluentd

RUN /usr/bin/curl -L | sh

Change the default user and group to root.

Needed to allow access to /var/log/docker/... files.

RUN sed -i -e "s/USER=td-agent/USER=root/" -e "s/GROUP=td-agent/GROUP=root/" /etc/init.d/td-agent

Install the Elasticsearch Fluentd plug-in.

RUN td-agent-gem install fluent-plugin-kubernetes_metadata_filter fluent-plugin-elasticsearch

Clone Fluentd Kafka plugin from github

RUN git clone

Install Kafka plugin

RUN td-agent-gem install fluent-plugin-kafka

Copy the Fluentd configuration file.

COPY td-agent.conf /etc/td-agent/td-agent.conf

Run the Fluentd service.

ENTRYPOINT ["td-agent"]

Docker Pull Command