Closed
Description
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 psql
and 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