In this bash script under Linux Alpine they have (line 8):
exec su-exec "$ZOO_USER" "$0" "$@"
As far as I know,
su-exec is however an Apache httpd dependecy - can I avoid it installing it under Ubuntu and use some more plain alternative?
I have tested so far:
su -c "$0 $@" $ZOO_USER
But then the call through Docker
CMD shows that I might have some sort of escaping/quotes error,
CMD ["zkServer.sh", "start-foreground"]
resulting in the following output; obviously there is a misplacement for the username field in the command sequence.
No passwd entry for user 'start-foreground'
But what is then the difference to the original (su-exec), which works fine? And how to get it right with
UPD: su-exec is here a third-parthy Alpine Linux package https://github.com/ncopa/su-exec