docker-library / docker-library/postgres
Initialization script when PGData is not empty
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 2.5k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
I know that when the PGData directory is not empty the container skips the initialization and therefore won't run the initialization script in /docker-entrypoint-initdb.d
I would like to use a way to give the container scripts that will run on startup no matter what (for example to create a role postgres if one does not exist already)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading how the container handles PGDATA and the /docker-entrypoint-initdb.d directory during startup. Define how scripts that run on every startup should differ from one-time initialization, including the requested case of creating a missing postgres role; done means the behavior is specified and covered for both empty and non-empty PGDATA.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, postgres, shell
- Domain
- databases, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100