デフォルトでは、コンテナ内のデータは一時的で、コンテナが削除されると失われます。ボリューム(およびバインドマウント)は、コンテナを超えて存続する永続的ストレージを提供し、データベースおよびコンテナの再起動や削除から生き残る必要があるデータに不可欠です。
コンテナは一時的である問題
A container's writable layer is DELETED when the container is removed:
→ data written inside the container (e.g. a database's files) is LOST
→ containers are meant to be disposable/replaceable → don't store important data in them
→ For persistent data, you need storage OUTSIDE the container's lifecycle.
