24 lines
754 B
Docker
24 lines
754 B
Docker
# Start from the Fluentd official image based on Debian
|
|
FROM fluent/fluentd:v1.12-debian-1
|
|
|
|
# Use root for the installation of additional plugins
|
|
USER root
|
|
|
|
# Update and install netcat
|
|
RUN apt-get update && apt-get install -y netcat
|
|
|
|
# Install necessary plugins
|
|
RUN fluent-gem install fluent-plugin-out-http --no-document && \
|
|
fluent-gem install fluent-plugin-record-reformer --no-document && \
|
|
fluent-gem install fluent-plugin-rewrite-tag-filter --no-document && \
|
|
fluent-gem install fluentd --no-document
|
|
|
|
# Copy your custom Fluentd configuration file
|
|
COPY fluent.conf /fluentd/etc/
|
|
|
|
# Change the directory permissions as needed
|
|
RUN chown -R fluent:fluent /fluentd && chmod -R 700 /fluentd/etc
|
|
|
|
# Switch back to the fluent user
|
|
USER fluent
|