X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Fcaas-logging.git;a=blobdiff_plain;f=docker-build%2Ffluentd%2FDockerfile;fp=docker-build%2Ffluentd%2FDockerfile;h=1d805f930abb15d039c2ba64e27cfeb0d2eb97f9;hp=0000000000000000000000000000000000000000;hb=229e54ec0c45ee7389247cf6cda79d31b303de85;hpb=9afa6af59d04c80d65eede7fc36b09d370b57abb diff --git a/docker-build/fluentd/Dockerfile b/docker-build/fluentd/Dockerfile new file mode 100644 index 0000000..1d805f9 --- /dev/null +++ b/docker-build/fluentd/Dockerfile @@ -0,0 +1,67 @@ +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM alpine:3.9 +MAINTAINER Levente Kale + +ARG VERSION +ENV FLUENTD_VERSION=$VERSION +ENV DUMB_INIT_VERSION=1.2.2-r1 +ENV SU_EXEC_VERSION=0.2-r0 +ENV PATH /fluentd/.gem/ruby/2.3.0/bin:$PATH +ENV LD_PRELOAD="" + +WORKDIR /fluentd + +COPY entrypoint.sh /bin/ + +RUN apk update \ +&& apk upgrade \ +&& apk add --no-cache \ + ca-certificates \ + ruby ruby-irb \ + su-exec==${SU_EXEC_VERSION} \ + dumb-init==${DUMB_INIT_VERSION} \ +&& apk add --no-cache --virtual .build-deps \ + build-base \ + ruby-dev \ + wget \ + gnupg \ + libffi-dev \ +&& update-ca-certificates \ +&& echo 'gem: --no-document' >> /etc/gemrc \ +&& gem install oj -v 2.18.3 \ +&& gem install json -v 2.1.0 \ +&& gem install fluentd -v ${FLUENTD_VERSION} \ +&& gem install fluent-plugin-secure-forward \ +&& gem install fluent-plugin-record-reformer \ +&& gem install fluent-plugin-rewrite-tag-filter \ +&& gem install fluent-plugin-elasticsearch \ +&& gem install fluent-plugin-kubernetes_metadata_filter \ +&& gem install bigdecimal \ +&& gem install etc \ +&& gem install webrick \ +&& apk del .build-deps \ +&& rm -rf /var/cache/apk/* \ +&& gem sources --clear-all \ +&& rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem \ +&& mkdir -p /fluentd/log \ +&& mkdir -p /fluentd/etc /fluentd/plugins \ +&& chmod +x /bin/entrypoint.sh \ +&& chmod 700 /fluentd/log + +# Copy configuration files +# TODO: change it to a dynamic ConfigMap, in case something needs to be run-time configurable +COPY ./conf/fluent.conf /fluentd/etc/ +