fluentd-docker-image
fluentd-docker-image copied to clipboard
Errors in entrypoint while running as root
I'm running Fluentd as root user by setting env variable FLUENT_UID=0
. I do this in the case of using fluent-plugin-systemd
plugin which needs access to journald as root user. It leads to the bunch of errors in entrypoint script after each restart, like:
WARNING: You are just about to delete the root account (uid 0)
Usually this is never required as it may render the whole system unusable
If you really want this, call deluser with parameter --force
Stopping now without having performed any action
useradd: user 'fluent' already exists
It can be simply fixed buy not always try to delete and create fluentd user. Let's create it only when container starts and do nothing while restarting. Is it mandatory to always delete and create user?
Sorry, I missed this issue.
Delete user is for preventing unexpected behaviour for fluentd and it doesn't consider for uid=0
.
One way is use own entrypoint.sh to overwrite default entrypoint.sh,
or update our entrypoint.sh
to skip user/gosu handling when uid is 0.