fluentd-concenter/Dockerfile

48 lines
1.4 KiB
Docker
Raw Normal View History

2023-12-11 19:02:42 +00:00
#inspired from https://github.com/fluent/fluentd-docker-image/blob/master/v1.16/alpine/Dockerfile
FROM alpine:3.19
2023-12-11 19:02:42 +00:00
LABEL maintainer "Stefan Reimer<stefan@zero-downtime.net>"
LABEL Description="Fluentd docker image intended as ingestion service" Vendor="Zero Down Time" Version="${version}"
COPY Gemfile* /fluentd/
# skip runtime bundler installation
ENV FLUENTD_DISABLE_BUNDLER_INJECTION 1
RUN apk update \
&& apk add --no-cache \
ca-certificates \
ruby ruby-irb ruby-etc ruby-webrick \
tini ruby-bundler \
&& apk add --no-cache --virtual .build-deps \
build-base linux-headers \
ruby-dev gnupg \
&& echo 'gem: --no-document' >> /etc/gemrc \
# Install additional gems from Gemfile
&& bundle config silence_root_warning true \
&& bundle install --gemfile=/fluentd/Gemfile \
&& 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/
ENV FLUENTD_CONF="fluent.conf"
2023-12-13 17:54:52 +00:00
ENV FLUENTD_OPT=""
2023-12-11 19:02:42 +00:00
ENV LD_PRELOAD=""
EXPOSE 24224 5140
USER fluent
ENTRYPOINT ["tini", "--", "/bin/entrypoint.sh"]
CMD ["fluentd"]