Skip to content

Instantly share code, notes, and snippets.

@kasumiru
Created November 15, 2017 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kasumiru/da06422cd87ea6146937d8c6a911d0e8 to your computer and use it in GitHub Desktop.
Save kasumiru/da06422cd87ea6146937d8c6a911d0e8 to your computer and use it in GitHub Desktop.
docker-td-agent
FROM ubuntu:14.04
MAINTAINER Takayuki Shimizukawa shimizukawa@gmail.com
# environment
ENV DEBIAN_FRONTEND noninteractive
# update
RUN apt-get update && apt-get -y upgrade
# ruby related packages for td-agent
RUN apt-get -y install curl libcurl4-openssl-dev ruby ruby-dev make
# install fluentd td-agent
RUN curl -L http://toolbelt.treasuredata.com/sh/install-ubuntu-trusty-td-agent2.sh | sh
# clean cache files
RUN apt-get clean && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
# install fluentd plugins
RUN /opt/td-agent/embedded/bin/fluent-gem install --no-ri --no-rdoc \
fluent-plugin-elasticsearch \
fluent-plugin-record-modifier \
fluent-plugin-exclude-filter
# add conf
ADD ./etc/fluentd /etc/fluentd
CMD /etc/init.d/td-agent stop && /opt/td-agent/embedded/bin/fluentd -c /etc/fluentd/fluent.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment