I have always wondered how a database and its persistence is handled in a containerized environment. This covers one of the issues.
The way you handle persistence is by using storage volumes mounted form the outside. Don't put the data in the container, only the software, which then can be replaced. Then managing is similar to other environments. For updating you don't replace rpm/deb packages and restart, but replace the container using the same volume, which should trigger the dbms-specific update routine. Similarly you do backups similar to ou…
Or is that when you have a layer of cache inbetween like Redis?