Initialize Postgres container with “template” database
Are there sample database containers?
How to connect Python to Docker Pg Database?
Connection error dbeaver docker postgres
I want to use docker compose to build a postgresql database with a starting “template” of a database. I do not want to use volumes to make it so that operations on a running container permanently change that template. I want to be able to compose down and compose up the image and it resets to that template. As far as I know the Volumes command doesn’t allow this to happen and I’m unsure how else to go about it. I’ve tried using COPY to copy a var/lib/postgresql/data directory into the container in the dockerfile but that doesn’t work either. Anyone know how to do this?
I'm working on an app that connects to several different kinds of databases. Currently, mostly Postgres, MySQL and maybe MSSQL.
What I need is a Docker container that has each of these databases but also includes sample data. I don't care what the data is. Just something with a database (or more) with multiple tables and records. Views, triggers, etc. would be cool too.
I can create my own but essentially what I'm looking for is the "lorem ipsum" for a database server.
Do such containers exist?
Thanks!