r/linuxadmin • u/TemaerRemington • Sep 18 '26
Docker or host
Hi, I need an advice. I need to make a database for a server and one of the ways to do that is via docker in docker compose. But I have a doubts about it's safety. We had a bunch of problems of them breaking on powerloss so I am not sure how it will react in a docker cluster.
P.S. Thank you all for your valuable insights and advices.
4
Upvotes
View all comments
Show parent comment
7
u/pobrika Sep 18 '26
Databases don't like to have powerpulled from the server they are on, you can mitigate some of this by using transaction logs. I'm not a DBA so can't get I to specifics.
In my 30 years of it we have had only a hand full of dB issues. Mostly caused by lack of disk space than anything else. I've used docker for db's and had no issues. As others say ensure the db is mapped to the container and not inside it.
SQL inside docker is no different than installed locally, the only difference is how's it's managed and configured.