Suggest an editImprove this articleRefine the answer for “Why do you need volumes?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**Volumes** are needed to store data independently of the container, since the container itself is a temporary thing. **Key point:** a volume is needed so that data outlives the container and remains accessible regardless of its lifecycle.Shown above the full answer for quick recall.Answer (EN)ImageVolumes are needed to **store data independently of the container**. A container is a temporary thing: it is easy to recreate, delete, or update. If data is stored inside the container, it disappears along with it. A volume solves this problem. The main reasons volumes are used: ### 1. Data durability The database, files, settings, and logs do not disappear when the container is rebuilt or removed. ### 2. Separation of concerns The container runs the application, while the volume stores the state. This makes the system cleaner and more convenient. ### 3. Safe updates You can update the image without fear of losing data - the volume connects to the new container. ### 4. Convenient work with services like PostgreSQL/MySQL Databases cannot live without persistent storage, so a volume is a standard tool. Summary: a volume is needed so that data outlives the container and remains accessible regardless of its lifecycle.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.