8000 GitHub Β· Where software is built
[go: up one dir, main page]

Skip to content
Add option to let the container stop gracefully after docker-entrypoint-initdb.dΒ #424
Closed
@metas-ts

Description

@metas-ts

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    RequestRequest for image modification or feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0