Files
kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile
Alex Robinson b3154a7815 Remove the garbage log file in the fluentd-gcp that gets filled with
gunk when installing the google-fluentd agent.

Also let it log things by not redirecting to a file within the container
and only using -q (warning logs only) rather than -qq (error logs only).
2015-08-27 21:41:44 +00:00

31 lines
1.2 KiB
Docker

# This Dockerfile will build an image that is configured
# to use Fluentd to collect all Docker container log files
# and then cause them to be ingested using the Google Cloud
# Logging API. This configuration assumes that the host performning
# the collection is a VM that has been created with a logging.write
# scope and that the Logging API has been enabled for the project
# in the Google Developer Console.
FROM ubuntu:14.04
MAINTAINER Alex Robinson "arob@google.com"
# Disable prompts from apt.
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -q update && \
apt-get install -y curl && \
apt-get clean && \
curl -s https://storage.googleapis.com/signals-agents/logging/google-fluentd-install.sh | sudo bash
# Install the record reformer plugin.
RUN /usr/sbin/google-fluentd-gem install fluent-plugin-record-reformer
# Remove the misleading log file that gets generated when the agent is installed
RUN rm -rf /var/log/google-fluentd
# Copy the Fluentd configuration file for logging Docker container logs.
COPY google-fluentd.conf /etc/google-fluentd/google-fluentd.conf
# Start Fluentd to pick up our config that watches Docker container logs.
CMD /usr/sbin/google-fluentd "$FLUENTD_ARGS"