-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add option to let the container stop gracefully after docker-entrypoint-initdb.d #424
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
Comments
+1 - this would be super useful for seeding data into a container and then recommitting it (think allowing developers to pull a container with seeded data already inside it |
The last line of the
As a hacky way to accomplish not starting the database, i currently remove the last line of
As a more permanent solution, an ENV variable (e.g $DONT_START_DATABASE) and a change to the last lines of the
As a plus, other people using the hacky solution with sed wouldn't be affected by the change. |
I have a similar kubernetes situation with the following in an init container: - name: setup
image: postgres
args:
# Trick entrypoint into exiting after setup
- postgres
- --version |
I think the |
This is now possible to accomplish properly/cleanly via #496. 🎉 👍 |
Looks like trick does not work anymore |
We added an explicit example in #1150, which happens to solve this specific use case. |
Hi,
I have two usage scenarios where imho it would make a lot of sense to have the option to just init a postgres DBMS via scripts in
/docker-entrypoint-initdb.d
and then have the docker container exit gracefully as soon as those init scripts are run.This would support my following use cases:
wdyt?
The text was updated successfully, but these errors were encountered: