docker-library / docker-library/postgres

Add an option to skip DB init check

Open
#1,220 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
2.5k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/docker-library/postgres/blob/master/16/alpine3.19/docker-entrypoint.sh#L234

Currently, checking if the DB is initialized is by checking if $PGDATA/PG_VERSION if exist.
However, PGDATA may not be the real data directory.
The real data directory can be overwritten by $PGDATA/postgresql.conf with data_directory = ''.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with 16/alpine3.19/docker-entrypoint.sh around line 234 and trace how the PG_VERSION check determines whether the database is initialized. Review how postgresql.conf and data_directory affect the real data location, then define and implement the skip option so the entrypoint honors it; done means initialization detection can be bypassed as requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, shell
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.