Introduction
Containers have their own filesystem that disappears when the container stops. This means any changes made inside the container are lost unless saved outside.
When you want to test an application without worrying about leftover files after stopping the container
When running short-lived tasks that do not need to save data permanently
When you want to keep your host system clean from temporary files created by containers
When you want to understand why data disappears after restarting a container
When you need to persist data beyond the life of a container using volumes