📦Container Volume
Also known as Docker Volume, Volume (Containers)
Storage that outlives the container. Files kept there stay when the box is gone.
Think of it like
It is like a backpack you keep when you change coats. Your things stay safe in it.
Example
Definition
Example code
console
$ docker volume create notes
notes
$ docker run --rm -v notes:/data alpine sh -c 'echo hi > /data/note.txt'
$ docker run --rm -v notes:/data alpine cat /data/note.txt
hi