Skip to content

Docker: how to use a configuration file#1634

Merged
lecaros merged 3 commits intofluent:masterfrom
mrgalopes:improve-docker-docs
May 30, 2025
Merged

Docker: how to use a configuration file#1634
lecaros merged 3 commits intofluent:masterfrom
mrgalopes:improve-docker-docs

Conversation

@mrgalopes
Copy link
Copy Markdown
Contributor

Hello!

I was testing Fluent Bit earlier this week, and struggled with getting the new YAML configuration file to work with Docker.
Just mounting the volume doesn't work, the default fluent-bit.conf in the image takes precedence over the YAML file, which took me a while to troubleshoot.

For example:

# fluent-bit.yaml
pipeline:
  inputs:
    - name: dummy
      dummy: '{"from": "yaml"}'

  outputs:
    - name: stdout

Running docker run -ti -v ./fluent-bit.yaml:/fluent-bit/etc/fluent-bit.yaml cr.fluentbit.io/fluent/fluent-bit does not load the YAML file.

Mounting the .conf file works though.
Maybe this will help those who tried the same thing as I did.

Let me know if you think anything needs changing or if you believe there is a better way to do this. Thanks!

Signed-off-by: Gabriel Lopes Rodrigues <gabriellopes@outlook.com>
@mrgalopes mrgalopes requested review from a team as code owners May 9, 2025 01:04
mrgalopes added 2 commits May 8, 2025 22:07
Signed-off-by: Gabriel Lopes Rodrigues <gabriellopes@outlook.com>
Signed-off-by: Gabriel Lopes Rodrigues <gabriellopes@outlook.com>
@lecaros lecaros merged commit 626187c into fluent:master May 30, 2025
5 checks passed
TomlinfreeGit pushed a commit to TomlinfreeGit/fluent-bit-docs that referenced this pull request Oct 28, 2025
* Docker: how to use a configuration file

Signed-off-by: Gabriel Lopes Rodrigues <gabriellopes@outlook.com>

* Docker: fix closing tabs

Signed-off-by: Gabriel Lopes Rodrigues <gabriellopes@outlook.com>

* Docker: break lines inside commands

Signed-off-by: Gabriel Lopes Rodrigues <gabriellopes@outlook.com>

---------

Signed-off-by: Gabriel Lopes Rodrigues <gabriellopes@outlook.com>
Signed-off-by: Tom <yao.lin@siemens.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants