To create endpoint that collects logs on your host just run:
docker run -d -p 24224:24224 -p 24224:24224/udp -v /data:/fluentd/log fluent/fluentd:v1.3-debian-1
Default configurations are to:
listen port 24224 for Fluentd forward protocol
store logs with tag docker.** into /fluentd/log/docker.*.log
(and symlink docker.log)
store all other logs into /fluentd/log/data.*.log (and symlink data.log)
Providing your own configuration file and additional options
fluentd arguments can be appended to the docker run line
For example, to provide a bespoke config and make fluentd verbose, then:
docker run -ti --rm -v /path/to/dir:/fluentd/etc fluent/fluentd -c /fluentd/etc/<conf> -v
The first -v tells Docker to share ‘/path/to/dir’ as a volume and mount it at /fluentd/etc
The -c after the container name (fluentd) tells fluentd where to find the config file
The second -v is passed to fluentd to tell it to be verbose
We can’t notice comments in the DockerHub so don’t use them for reporting issue or asking question.
If you have any problems with or questions about this image, please contact us
through a GitHub issue.
FAQ
Permission Issues with v1.19+
Due to a change in the default UID in vX.Y-A and vX.Y.Z-A.B images since v1.19,
you may encount permission errors when writing to mounted volumes.
To resolve this, please chown your data directories to the new UID.
Fluentd Docker Image
What is Fluentd?
Fluentd is an open source data collector, which lets you unify the data collection and consumption for a better use and understanding of data.
Supported tags and respective
DockerfilelinksCurrent images (Edge)
These tags have image version postfix. This updates many places so we need feedback for improve/fix the images.
Current images use fluentd v1 series.
v1.19.2-2.2,v1.19-2,edge,latest(v1.19/debian/Dockerfile) (Since v1.19.0, alpine image will not be shipped anymore.)v1.19.2-debian-2.2,v1.19-debian-2,edge-debian(multiarch image for arm64(AArch64), armhf and amd64(x86_64))v1.19.2-debian-amd64-2.2,v1.19-debian-amd64-2,edge-debian-amd64(v1.19/debian/Dockerfile)v1.19.2-debian-arm64-2.2,v1.19-debian-arm64-2,edge-debian-arm64(v1.19/arm64/debian/Dockerfile)v1.19.2-debian-armhf-2.2,v1.19-debian-armhf-2,edge-debian-armhf(v1.19/armhf/debian/Dockerfile)v1.19.2-windows-ltsc2019-1.0,v1.19-windows-ltsc2019-1(v1.19/windows-ltsc2019/Dockerfile)v1.19.2-windows-ltsc2022-1.0,v1.19-windows-ltsc2022-1(v1.19/windows-ltsc2022/Dockerfile)We recommend to use debian version for production because it uses jemalloc to mitigate memory fragmentation issue.
If you want to know the detail of supported image tags, see TAGRULE explanation.
Using Kubernetes?
Check fluentd-kubernetes-daemonset images.
How to use this image
To create endpoint that collects logs on your host just run:
Default configurations are to:
24224for Fluentd forward protocoldocker.**into/fluentd/log/docker.*.log(and symlinkdocker.log)/fluentd/log/data.*.log(and symlinkdata.log)Providing your own configuration file and additional options
fluentdarguments can be appended to thedocker runlineFor example, to provide a bespoke config and make
fluentdverbose, then:docker run -ti --rm -v /path/to/dir:/fluentd/etc fluent/fluentd -c /fluentd/etc/<conf> -vThe first
-vtells Docker to share ‘/path/to/dir’ as a volume and mount it at /fluentd/etc The-cafter the container name (fluentd) tellsfluentdwhere to find the config file The second-vis passed tofluentdto tell it to be verboseChange running user
Use
-uoption withdocker run.docker run -p 24224:24224 -u foo -v ...How to build your own image?
Check HOWTOBUILD explanation.
References
Docker Logging | fluentd.org
Fluentd logging driver - Docker Docs
Issues
We can’t notice comments in the DockerHub so don’t use them for reporting issue or asking question.
If you have any problems with or questions about this image, please contact us through a GitHub issue.
FAQ
Permission Issues with v1.19+
Due to a change in the default UID in
vX.Y-AandvX.Y.Z-A.Bimages since v1.19, you may encount permission errors when writing to mounted volumes. To resolve this, please chown your data directories to the new UID.For more details, please refer to #448.