Skip to content

Instantly share code, notes, and snippets.

@f0
Created March 8, 2017 18:45
Show Gist options
  • Save f0/ea0d9504398e7f38847217d684a4d0e9 to your computer and use it in GitHub Desktop.
Save f0/ea0d9504398e7f38847217d684a4d0e9 to your computer and use it in GitHub Desktop.
FROM fluent/fluentd:v0.12-debian-onbuild
USER root
COPY fluent-plugin-elasticsearch-1.9.2.pre.dirty.gem /fluent-plugin-elasticsearch-1.9.2.pre.dirty.gem
RUN buildDeps="sudo make gcc g++ libc-dev ruby-dev" \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
# cutomize following instruction as you wish
&& sudo -u fluent gem install \
fluent-plugin-elasticsearch \
fluent-plugin-beats \
fluent-plugin-systemd:0.0.7 \
fluent-plugin-newsyslog \
fluent-plugin-record-reformer \
fluent-plugin-grok-parser \
elasticsearch \
excon \
&& cd / && gem install -l fluent-plugin-elasticsearch-1.9.2.pre.dirty.gem \
&& sudo -u fluent gem sources --clear-all \
&& SUDO_FORCE_REMOVE=yes \
apt-get purge -y --auto-remove \
-o APT::AutoRemove::RecommendsImportant=false \
$buildDeps \
&& rm -rf /var/lib/apt/lists/* \
/home/fluent/.gem/ruby/2.3.0/cache/*.gem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment