What are the types of Docker volumes?
Quick Answer
Three: host (bind) volumes that map a host directory into the container, anonymous volumes that Docker names and manages, and named volumes that are user-defined and persist independently of any container.
Detailed Answer
Named and anonymous volumes live under Docker management (/var/lib/docker/volumes) and are the portable, recommended way to persist data; bind mounts map an exact host path and are handy for local development but couple you to the host layout. Volumes outlive container restarts and removals, which is how you avoid losing data.
Interview Tip
Recommend named volumes for persistence and bind mounts for dev, and stress that volumes survive container removal — the point of using them.