Dockerfile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Copyright 2016 The Kubernetes Authors.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. # This Dockerfile will build an image that is configured
  15. # to run Fluentd with an Elasticsearch plug-in and the
  16. # provided configuration file.
  17. # TODO(a-robinson): Use a lighter base image, e.g. some form of busybox.
  18. # The image acts as an executable for the binary /usr/sbin/td-agent.
  19. # Note that fluentd is run with root permssion to allow access to
  20. # log files with root only access under /var/log/containers/*
  21. # Please see http://docs.fluentd.org/articles/install-by-deb for more
  22. # information about installing fluentd using deb package.
  23. FROM gcr.io/google_containers/ubuntu-slim:0.4
  24. MAINTAINER Alex Robinson "arob@google.com"
  25. MAINTAINER Jimmi Dyson "jimmidyson@gmail.com"
  26. # Ensure there are enough file descriptors for running Fluentd.
  27. RUN ulimit -n 65536
  28. # Disable prompts from apt.
  29. ENV DEBIAN_FRONTEND noninteractive
  30. # Copy the Fluentd configuration file.
  31. COPY td-agent.conf /etc/td-agent/td-agent.conf
  32. COPY build.sh /tmp/build.sh
  33. RUN /tmp/build.sh
  34. # Run the Fluentd service.
  35. ENTRYPOINT ["td-agent"]