Creating Preloaded Database Containers for Quick Development

0
11
Asked By CleverCactus42 On

Hey everyone, I'm looking for advice on how to build database images that come with a pre-seeded schema and seed data in containers. My goal is to set up multiple ephemeral environments for development, each with different databases. I want to have a ready-made database container that I can quickly deploy for fast iteration, without needing long-term storage or backups. Can someone share their experience or tips on how to operationalize this setup using containers?

2 Answers

Answered By CuriousCoder99 On

I've done something similar for local app development. I created a Dockerfile and included a .sql dump file in the repo. When the containers are launched, the MariaDB image automatically loads the SQL files. You can check out the documentation for a similar approach!

Answered By CleverCactus42 On

Good point! My containers will be running in Docker, and I'm planning to use MS SQL and PostgreSQL as my databases, but I'm open to using tools like Kubernetes or Rancher if they help with the setup.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.