forked from ViaQ/docker-fluentd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
57 lines (51 loc) · 1.45 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM centos:centos7
MAINTAINER The BitScout Community <community@TBA>
EXPOSE 5140
ENV HOME=/opt/app-root/src \
PATH=/opt/app-root/src/bin:/opt/app-root/bin:$PATH \
RUBY_VERSION=2.0 \
FLUENTD_VERSION=0.12.17 \
GEM_HOME=/opt/app-root/src
RUN rpmkeys --import file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
# 1. Update packages
# 2. Install run-time dependencies
# 3. Install tools and dependencies for building ruby extensions. Ensure that
# yum records history in this run.
# 4. Install fluend with required plugins
# 5. Cleanup:
# - rollback the last yum transaction to uninstall ruby extension build
# dependencies
# - yum autoremove
# - remove yum caches
RUN yum update -y --setopt=tsflags=nodocs \
&& \
yum install -y --setopt=tsflags=nodocs \
ruby \
&& \
mkdir -p ${HOME} \
&& \
yum install -y --setopt=tsflags=nodocs --setopt=history_record=yes \
gcc-c++ \
ruby-devel \
libcurl-devel \
make \
&& \
gem install \
fluentd \
fluent-plugin-elasticsearch \
fluent-plugin-kubernetes_metadata_filter \
&& \
yum -y history undo last \
&& \
yum -y autoremove \
&& \
yum clean all
#
# Install the base configuration file and create the directory for "dynamic"
# configuration files.
#
COPY fluent.conf /etc/fluent/fluent.conf
RUN mkdir /etc/fluent/config.d
COPY config.d/*.conf /etc/fluent/config.d/
WORKDIR ${HOME}
CMD ["fluentd"]