Skip to content

Conversation

@yoo
Copy link
Contributor

@yoo yoo commented Nov 6, 2016

I reworked the docker image to allow setting the uid of the user fluent at runtime
and handle file ownership to avoid problems with host mounts.

The image now supports setting the uid of fluent with the env FLUENT_UID (defaults to 1000).
The envs FLUENTD_OPT and FLUENTD_CONF are still supported but the image can now be run with fluentds CLI parameters.

I added dumb-init and gosu as init system and to handel the user switching.

docker run -e FLUENT_UID=1234 fluent/fluentd -c /etc/your-fluentd.conf

Changes:

  • use envs with software versions for easier maintenance
  • add dumb-init and gosu
  • added an entrypoint script to create fluent user at runtime and chown data folders
  • moved the user creation from the Dockerfile into entrypoint.sh
  • run dumb-init as entrypoint to enable parameter handling

If want to merge this pull request upstream let me know and i will add documentation.

@repeatedly
Copy link
Member

repeatedly commented Nov 9, 2016

Feature is good but I don't have an experience of dumb-init and gosu software.
Are these projects popular in docker usecases?

@yoo
Copy link
Contributor Author

yoo commented Nov 10, 2016

They are:
gosu is used in many offical images like: mongodb, postgers elasticsearch or vault.
dumb-init is used by HashiCorp in their official images like vault and consul.

@repeatedly
Copy link
Member

I see.

I don't have an experience with these tools, so
we need check by other docker users...

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.

2 participants