Fluentd to 1.7.3, Elasticsearch to 7.4.0
[ta/caas-logging.git] / docker-build / fluentd / Dockerfile
1 # Copyright 2019 Nokia
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 FROM alpine:3.9
16 MAINTAINER Levente Kale <levente.kale@nokia.com>
17
18 ARG VERSION
19 ENV FLUENTD_VERSION=$VERSION
20 ENV DUMB_INIT_VERSION=1.2.2-r1
21 ENV SU_EXEC_VERSION=0.2-r0
22 ENV PATH /fluentd/.gem/ruby/2.3.0/bin:$PATH
23 ENV LD_PRELOAD=""
24
25 WORKDIR /fluentd
26
27 COPY entrypoint.sh /bin/
28
29 RUN apk update \
30 &&  apk upgrade \
31 &&  apk add --no-cache \
32         ca-certificates \
33         ruby ruby-irb \
34         su-exec==${SU_EXEC_VERSION} \
35         dumb-init==${DUMB_INIT_VERSION} \
36         libffi-dev \
37 &&  apk add --no-cache --virtual .build-deps \
38         build-base \
39         ruby-dev \
40         wget \
41         gnupg \
42 &&  update-ca-certificates \
43 &&  echo 'gem: --no-document' >> /etc/gemrc \
44 &&  gem install oj -v 2.18.3 \
45 &&  gem install json -v 2.1.0 \
46 &&  gem install fluentd -v ${FLUENTD_VERSION} \
47 &&  gem install fluent-plugin-secure-forward \
48 &&  gem install fluent-plugin-record-reformer \
49 &&  gem install fluent-plugin-rewrite-tag-filter \
50 &&  gem install fluent-plugin-elasticsearch \
51 &&  gem install fluent-plugin-remote_syslog \
52 &&  gem install fluent-plugin-kubernetes_metadata_filter \
53 &&  gem install bigdecimal \
54 &&  gem install etc \
55 &&  gem install webrick \
56 &&  apk del .build-deps \
57 &&  rm -rf /var/cache/apk/* \
58 &&  gem sources --clear-all \
59 &&  rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem \
60 &&  mkdir -p /fluentd/log \
61 &&  mkdir -p /fluentd/etc /fluentd/plugins \
62 &&  chmod +x /bin/entrypoint.sh \
63 &&  chmod 700 /fluentd/log