Skip to content

Database initialisation scripts and custom db path #148

@deployable

Description

@deployable

I use FROM mongo in Dockerfiles that occasionally setup custom mongo db paths.

It would be useful to have the initialisation scripts work in these circumstances, currently initialisation scripts run repeatedly as /data/db is never initialised.

Detecting --dbpath on the command line isn't too hard. Detecting dbPath in a config file is a bit harder.

Another option could be using a "state" file, possibly one for each of the "user" and "init" steps, stored in the container somewhere on successful init. Was that approach considered/avoided for the current implementation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions