Suggest an editImprove this articleRefine the answer for “What is a volume in Docker?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)A **volume** is a Docker mechanism for persistently storing data that must not disappear when a container is removed or recreated. **Key point:** a volume is a persistent, reliable storage that doesn't depend on the container's lifecycle.Shown above the full answer for quick recall.Answer (EN)ImageA volume is a Docker mechanism for **persistently storing data** that must not disappear when a container is removed or recreated. Why it's needed: **1. Data lives outside the container** The container can be deleted, rebuilt, or updated, while the database, files, and logs are preserved. **2. Convenient work with databases** Postgres, MySQL, Redis, and other services use a volume so their data doesn't disappear on restart. **3. Separation of data and application** The container handles logic, the volume handles storage. Examples in Compose: ```yaml services: db: image: postgres volumes: - pgdata:/var/lib/postgresql/data volumes: pgdata: ``` Summary: a volume is a persistent, reliable storage that doesn't depend on the container's lifecycle.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.