Docker Image

This article explains how to use Fluentd's official Docker image, maintained by Treasure Data, Inc.

Step 0: Install Docker

Please download and install Docker from here.

Step 1: Pull Fluentd's Docker image

Then, please download Fluentd v0.12's image by docker pull command.

$ docker pull fluent/fluentd:v0.12-debian

Debian and Alpine Linux version is available for Fluentd image. Debian version is recommended officially since it has jemalloc support, however Alpine image is smaller.

Step 2: Launch Fluentd Container

To make the test simple, create the example config below at /tmp/fluentd.conf. This example accepts records from http, and output to stdout.

# /tmp/fluentd.conf
<source>
  @type http
  port 9880
  bind 0.0.0.0
</source>
<match **>
  @type stdout
</match>

Finally, you can run Fluentd with docker run command.

Step3: Post Sample Logs via HTTP

Let's post sample logs via HTTP and confirm it's working. curl command is always your friend.

Use docker ps command to retrieve container ID, and use docker logs command to check the specific container's log.

Next Steps

Now you know how to use Fluentd via Docker. Here're a couple of Docker related documentations for Fluentd.

Also, please see the following tutorials to learn how to collect your data from various data sources.

If this article is incorrect or outdated, or omits critical information, please let us know. Fluentd is a open source project under Cloud Native Computing Foundation (CNCF). All components are available under the Apache 2 License.

Last updated

Was this helpful?