docker-library / docker-library/postgres

suggestion: add a default include_dir configuration

Open
#835 10 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi,

I find it harder than it should be to customize postgresql.conf:

  • usually PGDATA is bind mounted so it’s not always easy to add a file in there at the right time (or replace a file)
  • there’s options with /docker-entrypoint-initdb.d scripts but those are executed only when the database does not exists

so I suggest to add an include_dir configuration in the default postgresql.conf

in the Dockerfile, where listen_addresses is added, something along mkdir /docker-postgres-conf.d/ && echo 'include_dir=/docker-postgres-conf.d/' >> /usr/share/postgresql/postgresql.conf.sample

I believe this would be really useful, comes with no BC break and low maintenance

what do you think ?

(might be related to #581)

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 by reviewing the Dockerfile area where listen_addresses is added and the generated /usr/share/postgresql/postgresql.conf.sample. Check the related discussion in #581 and determine how the proposed /docker-postgres-conf.d/ include_dir should be represented across the image. Done means the default configuration exposes the requested include directory without relying on docker-entrypoint-initdb.d.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.