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

Request : Add docker-entrypoint.sh provided in the nginx image, so that environment variables can be used in the configuration #186

Open
omasseau opened this issue Jul 21, 2021 · 4 comments

Comments

@omasseau
Copy link

It would be nice to add in the image the docker-entrypoint.sh file and the docker-entrypoint.d folder which are provided in the nginx official image and add it as an ENTRYPOINT of the openresty image:

ENTRYPOINT ["/docker-entrypoint.sh"]

(see : https://github.com/nginxinc/docker-nginx/blob/f958fbacada447737319e979db45a1da49123142/mainline/debian/Dockerfile)

This will allow to use environnement variables in the configuration as described here :
https://github.com/docker-library/docs/tree/master/nginx#using-environment-variables-in-nginx-configuration-new-in-119 :)

Note that docker-entrypoint.sh may have to be adapted to support the "/usr/bin/openresty" command:

if [ "$1" = "nginx" -o "$1" = "nginx-debug" ]; then

-->

if [ "$1" = "/usr/bin/openresty"]; then

@neomantra
Copy link
Member

I could see how that is useful. I don't have time to work on this myself, but would check out PRs.

@korokunt
Copy link

I could see how that is useful. I don't have time to work on this myself, but would check out PRs.

rly? it 5 min copy-paste ( okay, i did it.. local xD

@neomantra
Copy link
Member

Great, then make a complete and tested PR rather than a useless comment.

@TafkaMax
Copy link

TafkaMax commented Jan 5, 2024

I have kind of implemented this in my modsecurity-packaged version. I am only building the alpine-fat version currently though. I will look into this, maybe I can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants