डिफ़ल्टरूपमा, कन्टेनर भित्रको डेटा ephemeral हुन्छ — कन्टेनर हटाइयो भने हराउन्छ। Volumes (र bind mounts) ले persistent storage प्रदान गर्छन् जुन कन्टेनरको जीवनकाल भन्दा लामो रहन्छ, डेटाबेस र कुनै पनि डेटाको लागि आवश्यक जो कन्टेनर restart/removal भन्दा पछि सञ्चित हुनु पर्छ।
समस्या: कन्टेनरहरू ephemeral छन्
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.
