docker-nginx icon indicating copy to clipboard operation
docker-nginx copied to clipboard

Additional sourced entrypoint files

Open JuniorJPDJ opened this issue 2 years ago • 4 comments

This allows reusing variables declared between entrypoint scripts.

You can create eg. entrypoint starting with 00 to declare some dynamic variables and then use those in envsubst predefined entrypoint.

JuniorJPDJ avatar Jul 19 '22 23:07 JuniorJPDJ

See https://github.com/nginxinc/docker-nginx/issues/431 for some discussion on that matter.

thresheek avatar Jul 20 '22 07:07 thresheek

Hmm.. you are right. I can add separate case for eg. .envsh and that would be sourced. Order will be preserved, compatibility will be preserved..

JuniorJPDJ avatar Jul 20 '22 11:07 JuniorJPDJ

I actually have that patch already done, just not published. I would like some input on the PR i linked first if that would work for their use cases as well. (I don't see why not, but who knows).

thresheek avatar Jul 20 '22 11:07 thresheek

I cannot see any PR linked here nor in issue you linked here. You mean you want my feedback in the issue? Sure!

JuniorJPDJ avatar Jul 20 '22 13:07 JuniorJPDJ

Hello. Is there any progress on merging this or providing similar solution? This is kinda blocking (as I don't want to implement workaround temp solutions if possible to merge this) for my other changes in funkwhale project.

JuniorJPDJ avatar Sep 04 '22 10:09 JuniorJPDJ

Thanks for the PR, implementation and reminders!

I've manually adapted the patch and pushed it in https://github.com/nginxinc/docker-nginx/commit/667512852e35b485cc557412e58648cf70a77759

thresheek avatar Sep 09 '22 13:09 thresheek

Thanks for this awesome feature! @thresheek can you tell when will it be released as 1.24?

l1553k avatar Sep 15 '22 13:09 l1553k

Hi @l1553k! It will be available with the next 1.23 release, however we don't have a strict ETA for it yet. Hopefully in two or three weeks.

thresheek avatar Sep 15 '22 13:09 thresheek

Thanks for the PR, implementation and reminders!

I've manually adapted the patch and pushed it in 6675128

@thresheek I've patched the docker-entrypoint.sh in a local setup with the current 1.23.1 release. I've noticed that source isn't functioning with /bin/sh but, it works if I change the shell to /bin/bash. Not sure if this can be an issue with the next build.

blubberblah avatar Sep 27 '22 10:09 blubberblah

Oh indeed, it seems debian's dash doesnt support source. Thanks!

thresheek avatar Sep 27 '22 10:09 thresheek

Fixed in https://github.com/nginxinc/docker-nginx/commit/cc7ca22aee900542c05594d7a2b18623d84c7d12 - thanks for the notification @blubberblah !

thresheek avatar Sep 27 '22 11:09 thresheek