Advise running databases in docker containers

Hi everyone,

I am a DBA and am researching databases in containers. I have no hands-on practise or a lot of knowledge of docker.
I have read a few articles about running databases ( oracle, sqlserver, postgres and mysql) in a docker container, but most of them don’t advise to run production databases in a a container.
At first the containers were only meant for stateless apps ( at least it’s what I have read).
But I can’t seem to find any articles or documentation that explains why it’s possible to run databases in a persistent container keeping all the data after reboot.
How can I build an image that can handle stateful applications/databases?
Can someone point me in the right direction of mayble explain it to me.
Thanks in advance.
Regards,
Marian