Description
Docker volumes are file systems that are stored on the host and mounted in the Docker containers. They are used to preserve data independent of the container life cycle.[1]
Videos
Types of Volumes
Host Volumes
-v /path/on/host:/path/in/container
Anonymous Volumes
-v /path/in/container
Named Volumes
-v volume_name:/path/in/container
docker compose
Named Volume Examples
1 | version: '3' |
docker volume command
docker volume inspect [volume_name]