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

commands are executed twice within docker-entrypoint.sh of version 3.2 #76

Closed
crossz opened this issue Sep 19, 2016 · 1 comment
Closed
Labels
question Usability question, not directly related to an error with the image

Comments

@crossz
Copy link

crossz commented Sep 19, 2016

exec gosu redis "$0" "$@"
this in docker-entrypoint.sh makes above commands executed twice. such as following when I set -ex in it:

root@ubuntu:~/Desktop/redis/3.2/alpine# docker run -it --rm redis-orig
+ [ redis-server != redis-server ]
+ [ redis-server != redis-server ]
+ id -u
+ [ redis-server = redis-server -a 0 = 0 ]
+ chown -R redis .
+ exec su-exec redis /usr/local/bin/docker-entrypoint.sh redis-server
+ [ redis-server != redis-server ]
+ [ redis-server != redis-server ]
+ id -u
+ [ redis-server = redis-server -a 100 = 0 ]
+ exec redis-server

What's the purpose of this? why not just
exec gosu redis "$@"

@yosifkit
Copy link
Contributor

It looks like it was just in case we were going to do more "work" after and to follow the pattern of other images, like rabbitmq.

@wglambert wglambert added the question Usability question, not directly related to an error with the image label Apr 24, 2018
@crossz crossz closed this as completed Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

3 participants