26 May, 2024

Simple containerised MariaDB setup


 

 Quite often I might want to try out some little network-connected tool or technology and to do this I try to run them in a container for the benefit of their config isolation. In most cases I want to do something quick and easy and I start-off by hunting-down a container image on DockerHub and then fire that up under Podman (would you like one of my pamphlets about why Podman is a superior religion to Docker?).

    More often than I'd like to admit, my heart will sink when I see in the documentation for these random container images something like "just set the db-name/user/password variables and it'll work". I figure that whatever it was I was looking at is more complicated than I'd hope and I give-up and try something else (my other religion is "You probably don't need an RDBMS").

    However in the back of my mind there's a little voice saying "You lazy sod! Why don't you just have a scratch MariaDB server ready to go that can be trashed and re-created easily?". So that's what this post is about.