Cloud Computing
Docker
Subjective
Sep 30, 2025
What are Docker volumes and explain different types?
Detailed Explanation
Docker volumes provide persistent storage for containers. Types: 1) Named Volumes: Managed by Docker - docker volume create myvolume, docker run -v myvolume:/data app, 2) Bind Mounts: Mount host directory - docker run -v /host/path:/container/path app, 3) tmpfs Mounts: Temporary filesystem in memory - docker run --tmpfs /tmp app. Benefits: Data persistence beyond container lifecycle, Sharing data between containers, Backup and restore capabilities, Performance optimization. Example use case: Database containers use named volumes to persist data even when container is recreated.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts