Closed
Description
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:
- on my jenkins, I would like to get an initial pg-dump, then apply some migration scripts and then create and publish a new pg-dump. As soon as that's done, the docker container should stop.
- in my kubernetes cluster, I would like to use a postgres docker container as a kubernetes init-container to prepare the grounds before the real postgresql container actually starts. Why: the init-container's image contains a lot of stuff that is only needed for database inititalization (in my case curl and a java runtime environment...yeah, better don't ask ;-) )..but it writes the database files into a volume which is then used by the real production postgres container.
wdyt?