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

Adding a startup hook #3

Open
databus23 opened this issue Mar 5, 2015 · 1 comment
Open

Adding a startup hook #3

databus23 opened this issue Mar 5, 2015 · 1 comment

Comments

@databus23
Copy link
Contributor

Hi,

how do you feel about adding an optional startup hook to your ENTRYPOINT script?
I want to generate some nginx config from environment variables during startup and currently would need to replace your script.
Instead I think it would be useful of your script contained something like

[ -f /opt/startup_hook.sh ] && /opt/startup_hook.sh

just before starting nginx?

@MarvAmBass
Copy link
Owner

Thanks for the Comment, I'm also looking for something like this.

As you might have seen, in some of my own child docker containers I use sed to replace some parts of my entrypoint script and add a new line there.

So at this time the best would be to just use sed and replace something like "#!/bin/bash" with "#!/bin/bash\nyourscript.etc"

the only thing I would directly implement would be some kind of entrypoint dependency management, sort of the debian start scripts

/opt/entrypoints/00MysupercoolScript.sh
/opt/entrypoints/05IGetStartedTo.sh
/opt/entrypoints/99YeahStartMeAtLast.sh

And a loop over all of these files. I might check it this weekend, or you'll script it and I'll just merge it.

But try to not break anything :D my images are ment to be used in heavy production - I don't want to scare some users away by changing to much behaviour

thanks greetings

Marvin

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

No branches or pull requests

2 participants