8000 Recurse subdirectories for docker-entrypoint-initdb.d functionality · Issue #179 · docker-library/postgres · GitHub
[go: up one dir, main page]

Skip to content
Recurse subdirectories for docker-entrypoint-initdb.d functionality #179
Closed
@md5

Description

@md5

Over in postgis/docker-postgis#35, I had a user ask about adding their own script to /docker-entrypoint-initdb.d via docker-compose without overwriting the script I use for initializing PostGIS. My suggestion was to bind-mount individual scripts, but it dawned on me that it might be nice to be able to add scripts to subdirectories of /docker-entrypoint-initdb.d and have them sourced or executed according to the existing logic.

The main drawback I see of making this change is that it's possible that existing users of the postgres image may already have files in subdirectories of /docker-entrypoint-initdb.d that they don't want to have executed directly by the postgres entrypoint. Another minor but solvable issue is maintaining the execution order of the scripts, which I believe I documented when this functionality was originally added:

These initialization files will be executed in sorted name order as defined by the current locale, which defaults to en_US.utf8

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