fluentd-ingest/docker/fluentd/Dockerfile

27 lines
885 B
Docker

# Use the official Fluentd Alpine-based image as a base
FROM fluent/fluentd:v1.12-debian-1
# Use root to perform the operations
USER root
# Update and Install build dependencies for native extensions
# This step is necessary for some Fluentd plugins that require native extensions
RUN apk add --no-cache --update build-base ruby-dev
# Install any additional dependencies or plugins you need
# Example: fluent-plugin-out-http, adjust according to your needs
RUN fluent-gem install fluent-plugin-out-http --no-document
# Clean up
RUN apk del build-base ruby-dev && \
rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem
# Copy your custom Fluentd configuration file into the image
COPY fluent.conf /fluentd/etc/
# Set the configuration file as the main configuration file for Fluentd
ENV FLUENTD_CONF=fluent.conf
# Switch back to the fluent user for security
USER fluent