▲ 4 points
back
5 comments
Besides faster start time, one use case would be state persistence.
If you have a process that writes stuff to a file inside a container (not in a volume or mounted path), stopping a container without destroying it doesn't delete the modifications. Starting the container again may allow the process to read the contents of the file, possibly continuing its execution from some checkpoint.
ins't this an invitation to screw up your app design?
Yeah.
But I suppose it can be used for some basic caching, as long as it's properly implemented. Like some LRU layer over SQLite.
I mean starting and stopping a container won't work anymore if you use a container orchestration layer (e.g. K8s).
I guess faster start up time because layers won't be re-extracted from the image and the "rootfs" would be in place hence faster startup times.
Other use case would be with stateful containers such as running a database, stopping it and starting it again without losing data (which already should be on a mounted volume)
Interested to know if there are other use cases.