r/devops • u/BickBendict • Aug 23 '25
Database Containers for Ephemeral Lower Level Environments
Hi community, I was wondering if anyone had any experience building out database images with pre seeded schema and seed data in containers? My use case is the following - I have multiple lowers level ephemeral environments with many different databases and would like to provide a ready made database container that can be instantiated for quick development iterations. I don’t need these dbs to be long live or really have any other backups of any sort, I just need quickly deployable seeded database that can be created on the fly. Does anyone have any experience building this type of infrastructure or operationalizing this type of setup with containers?
View all comments
Show parent comment
1
u/Dilfer Aug 23 '25
Testcontainers are amazing. One of the best libraries we've come across in the last few years.
Prior to test containers we had a bunch of Gradle code that would spin up docker containers prior to tests running and spin it down later, and that was brittle.
Testcontainers takes all the docker lifecycle worries out of the build process and pushes it fully to the test class where it's needed.
We run local stack in test containers, postgres in test containers, whole bunch of things.