Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow usage with --user option #20

Closed
devster31 opened this issue Feb 11, 2019 · 1 comment
Closed

Allow usage with --user option #20

devster31 opened this issue Feb 11, 2019 · 1 comment

Comments

@devster31
Copy link

This is a feature request to have this container work with --user [docker] and user: [docker-compose] options.
The way the current startup sequence is structured requires running chown to a container user with a predefinite UID and GID.
Other images, however, (e.g. official postgres here for example), use lines like chown -R "$(id -u)" "$PGDATA" 2>/dev/null || :.
Testing for $(id -u) = 0 and changing znc:znc to "$(id -u):$(id -g)" in:

chown -R znc:znc "$DATADIR" || exit 1

as well as tweaking su-exec from
exec /sbin/tini -- su-exec znc:znc /opt/znc/bin/znc --foreground --datadir "$DATADIR" "$@"

should be sufficient to allow arbitrary --user values and not break anything.

@DarthGandalf
Copy link
Member

Thanks for the advice!

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

No branches or pull requests

2 participants