Whenever I read about docker or containers in general, I wonder how it could possibly work in real world applications.
That's what I (think I) understood until now:
- docker encapsulates an application, but not the applications data
- updates are done by completely exchanging the applications container (e.g. remove myApp 1.0.0 and start myApp 1.0.1)
- all non-volatile data is stored outside of the container in volumes (which are basically shared directories between the host and docker's containers)
However, if that's how it's done, how do Update processes / database schema updates / ... work?
A more specific example: If I have an postgres container and I need to update the database version (ergo: install the new container). How do I update the database files to the newer version, when the postgresql installation / updater will be never executed?