How to create a volume and set local host mount point.
docker volume create --driver local \
--opt type=none \
--opt device=/home/user/test \
--opt o=bind \
test_vol
docker run -it --rm \
--mount type=volume,dst=/container/path,volume-driver=local,volume-opt=type=none,volume-opt=o=bind,volume-opt=device=/home/user/test \
foo
...
test:
volumes:
- bind-test:/var/lib/grafana
volumes:
bind-test:
driver: local
driver_opts:
type: none
o: bind
device: /home/user/test