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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
16 MAINTAINER Levente Kale <levente.kale@nokia.com>
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
27 COPY entrypoint.sh /bin/
31 && apk add --no-cache \
34 su-exec==${SU_EXEC_VERSION} \
35 dumb-init==${DUMB_INIT_VERSION} \
36 && apk add --no-cache --virtual .build-deps \
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 \
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