-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (46 loc) · 1.72 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
FROM alpine:3.17
LABEL maintainer="Rahmi Sacal"
LABEL Description="Fluentd docker image" Vendor="Turkcell" Version="1.14.6"
RUN apk update \
&& apk add --no-cache \
ca-certificates \
ruby ruby-irb ruby-etc ruby-webrick \
tini \
&& apk add --no-cache --virtual .build-deps \
build-base linux-headers \
ruby-dev gnupg \
&& echo 'gem: --no-document' >> /etc/gemrc \
&& gem install elasticsearch -v 7.6 \
&& gem install oj -v 3.14.3 \
&& gem install json -v 2.6.3 \
&& gem install rexml -v 3.2.5 \
&& gem install async -v 1.31.0 \
&& gem install async-http -v 0.60.1 \
&& gem install fluentd -v 1.14.6 \
&& gem install bigdecimal -v 1.4.4 \
&& gem install fluent-plugin-rewrite-tag-filter \
&& gem install fileutils \
&& gem install fluent-plugin-concat \
&& gem install fluent-plugin-jq \
&& gem install fluent-plugin-kubernetes_metadata_filter \
&& gem install fluent-plugin-prometheus \
&& gem install fluent-plugin-record-modifier \
&& gem install fluent-plugin-systemd \
&& gem install fluent-plugin-elasticsearch -v 5.2.2 \
&& apk del .build-deps \
&& rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test
RUN addgroup -S fluent && adduser -S -G fluent fluent \
# for log storage (maybe shared with host)
&& mkdir -p /fluentd/log \
# configuration/plugins path (default: copied from .)
&& mkdir -p /fluentd/etc /fluentd/plugins \
&& chown -R fluent /fluentd && chgrp -R fluent /fluentd
#COPY fluent.conf /fluentd/etc/
COPY entrypoint.sh /bin/
RUN chmod +x /bin/entrypoint.sh
ENV FLUENTD_CONF="fluent.conf"
ENV LD_PRELOAD=""
EXPOSE 24224 20001
USER fluent
ENTRYPOINT ["tini", "--", "/bin/entrypoint.sh"]
CMD ["fluentd"]