This is a Docker image for 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.
$ docker build -t mosuka/docker-fluentd:latest .
| Name | Description |
|---|---|
| FLUENT_LOG_ROTATE_AGES | Specify generations to keep rotated log files. Default is 5 |
| FLUENT_LOG_ROTATE_SIZE | Sets the byte size to rotate log files. Default is 1000000 |
| FLUENTD_LOG_LEVEL | Specify log level of Fluentd. Default is info. See Logging of Fluentd for more details |
| FLUENT_CONF_CONTENT | Specify the content of fluent.conf |
| INSTALL_GEM_ARGS(_1..10) | Specify the semicolon delimiter of the Gem package name and version to be installed. For example, fluent-plugin-output-solr:0.4.0 |
$ docker run -d -p 9292:9292 -p 24224:24224/tcp -p 24224:24224/udp --name fluentd \
--env FLUENT_LOG_ROTATE_AGES=5 \
--env FLUENT_LOG_ROTATE_SIZE=1000000 \
--env FLUENTD_LOG_LEVEL=info \
--env INSTALL_GEM_ARGS_1="-f -v 0.4.0 fluent-plugin-output-solr" \
--env INSTALL_GEM_ARGS_2="-f -v 0.5.2 fluent-plugin-filter-geoip" \
--env FLUENT_CONF_CONTENT="$(cat fluent_file.conf)" \
mosuka/docker-fluentd:latest
b6f25b1a787081054d24af970cf11622995b0a308c77c12c4604ce7f34522166
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b6f25b1a7870 mosuka/docker-fluentd:latest "/usr/local/bin/do..." 11 seconds ago Up 6 seconds 0.0.0.0:9292->9292/tcp, 0.0.0.0:24224->24224/tcp, 0.0.0.0:24224->24224/udp fluentd
$ FLUENTD_CONTAINER_IP=$(docker inspect -f '{{ .NetworkSettings.IPAddress }}' fluentd)
$ echo ${FLUENTD_CONTAINER_IP}
172.17.0.10
$ FLUENTD_HOST_IP=$(docker-machine ip default)
$ FLUENTD_HOST_IP=${FLUENTD_HOST_IP:-127.0.0.1}
$ echo ${FLUENTD_HOST_IP}
127.0.0.1
$ FLUENTD_HOST_UI_PORT=$(docker inspect -f '{{ $port := index .NetworkSettings.Ports "9292/tcp" }}{{ range $port }}{{ .HostPort }}{{ end }}' fluentd)
$ echo ${FLUENTD_HOST_UI_PORT}
9292
$ FLUENTD_HOST_PORT=$(docker inspect -f '{{ $port := index .NetworkSettings.Ports "24224/tcp" }}{{ range $port }}{{ .HostPort }}{{ end }}' fluentd)
$ echo ${FLUENTD_HOST_PORT}
24224
$ FLUENTD_DASHBOARD=http://${FLUENTD_HOST_IP}:${FLUENTD_HOST_UI_PORT}/daemon
$ echo ${FLUENTD_DASHBOARD}
http://127.0.0.1:9292/daemon
$ docker stop fluentd; docker rm fluentd
fluentd
fluentd
Content type
Image
Digest
Size
349 MB
Last updated
over 9 years ago
docker pull mosuka/docker-fluentd