docker-library / docker-library/postgres

initdb script seems does not respect hba_file configuration option

Open
#1,131 3 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

It seems that location of pg_hba.conf file is just hardcoded: https://github.com/docker-library/postgres/blob/8a631b939a0b4197cb6bef49b50b6c40c80ddf5b/15/bookworm/docker-entrypoint.sh#L253

But If I set my custom hba_file, then initdb will create redundant $PGDATA/pg_hba.conf file.

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 at docker-entrypoint.sh around line 253 and review how the initdb setup handles pg_hba.conf. Compare that behavior with a custom hba_file setting, then verify that initialization does not create a redundant $PGDATA/pg_hba.conf file.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgres, shell
Domain
database
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.