一、安装fluent-plugin-elasticsearch

编写Dockerfile

FROM fluent/fluentd:v1.12.0-debian-1.0
USER root
RUN gem uninstall -I elasticsearch && gem install elasticsearch -v 6.8.0
RUN ["gem", "install", "fluent-plugin-elasticsearch", "--no-document", "--version", "1.18.2"]
USER fluent