nginxinc / nginx-ldap-auth

Example of LDAP authentication using ngx_http_auth_request_module
BSD 2-Clause "Simplified" License
678 stars 202 forks source link

Add to dockerfile entrypoint #58

Open shizacat opened 5 years ago

vl-homutov commented 5 years ago

Please provide some explanation on why is this needed and/or what benefits it brings, and update commit logs if you want this to be merged.

shizacat commented 5 years ago

It will be easier to run the script. You will not need to know the name of interpreter (python) and full path to the script in to container. It will be sufficient to specify the arguments for the script, such as --port. Example:

docker run --rm -ti nginx-ldap-auth --help
mingalevme commented 1 year ago

@vl-homutov, can you merge the PR, please? it's really not good rewrite the full command just to add some arguments. In my case I use args -u, -b, -D and -w of the nginx-ldap-auth-daemon.py-script.

Without PR I must rewrite the full CMD, i.e.

docker run nginx-ldap-auth python /usr/src/app/nginx-ldap-auth-daemon.py --host "0.0.0.0" --port "8888" -u "..." -b "..." -D "..."  -w "..."

So in case you change the interpreter and/or path to script the command above will be broke.

With PR is only:

docker run nginx-ldap-auth --host "0.0.0.0" --port "8888" -u "..." -b "..." -D "..."  -w "..."

And the command is works in case of changing interpreter and/or path to script.