Volumes are the preferred mechanism for persisting data generated by and used by Docker containers. A volume allows data to persist, even when a container is deleted. Volumes can be used to share data between the host and the container(s).
By mounting a volume you can achive to
- Pull data from a container.
- Push data to a container.
- Share data between containers.
Please note that, arguments prefixed with @(at) in below commands must be replaced with actual values.