Skip to content

How to add additional users and databases? #68

Closed
@phlegx

Description

@phlegx

I can add additionally users and database with psql as soon as the postgres server is started. With this docker image the binary is started via docker-entrypoint.sh How can I automate this within my own Dockerfile?

I assume I would need to write a script that I call within my Dockerfile as an entrypoint. This script would need to start the database server, then execute the commands with psqland afterwards stop the db server again and let the original docker-entrypoint.sh entrypoint taken place. However I'm not sure: how can I start and stop a postgres server manually within my custom script with this postgres docker image?

thanks
m

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions