Dockerfile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Copyright 2017 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. # The image acts as an executable for the binary /usr/sbin/td-agent.
  18. # Note that fluentd is run with root permssion to allow access to
  19. # log files with root only access under /var/log/containers/*
  20. FROM debian:buster-slim
  21. ARG DEBIAN_FRONTEND=noninteractive
  22. COPY install.sh /tmp/install.sh
  23. COPY Gemfile /Gemfile
  24. RUN chmod +x /tmp/install.sh && \
  25. /bin/bash -l -c /tmp/install.sh && \
  26. rm /tmp/*
  27. # Copy the Fluentd configuration file for logging Docker container logs.
  28. COPY fluent.conf /etc/fluent/fluent.conf
  29. COPY run.sh /run.sh
  30. # Expose prometheus metrics.
  31. EXPOSE 80
  32. ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
  33. # Start Fluentd to pick up our config that watches Docker container logs.
  34. CMD ["/run.sh"]