4

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 this Docker command shows that I might have some sort of escaping/quotes error,

CMD ["zkServer.sh", "start-foreground"]

resulting in the following output. What is the difference to the original, which works fine?

No passwd entry for user 'start-foreground'
1

1 Answer 1

3

As colleagues at DevOps SE have pointed out, the proper usage of ´su´ should be:

su -c "$0" "$ZOO_USER" "$@"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.