-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Is there a way to add a script which will run always on container start #191
Comments
It is not something we had considered. Is it something that could be accomplished with |
@yosifkit Thanks for response! However for now , I created an Dockerfile with based image as postgres and added a RUN command to modify docker-entrypoint.sh using sed (inserting my logic somewhere in that entry point script). |
I have another scenario which requires running a command each time the container is started. My build system outputs a generated script that adds database roles (if not exists) for currently enabled services. The new It would be useful to have the entrypoint trigger scripts for different events. e.g., |
It's a Closing, since we have no intention of explicitly supporting this in the image itself. |
This is not applicable to postgres cause |
And this scenario is covered by the example I gave when creating the source-able entrypoint: #496 (comment) |
This comment was marked as off-topic.
This comment was marked as off-topic.
I realize this was 8 years, but anybody interested can see this little beauty of mine: how to run autotune script and restart server after the database (and the initial configuration) has been created -- use "docker-ensure-initdb.sh" of course, here's an example: https://github.com/iplweb/bpp/tree/dev/deploy/dbserver |
Currently scripts present inside docker-entrypoint-initdb.d/* will run only once (during initialization).
I have a script which does health checkup and I would like that script to be executed always i.e. whenever container starts.
One way could be to modify docker-entrypoint.sh but i was wondering if it's possible w/o modifying entrypoint script.
The text was updated successfully, but these errors were encountered: