File or directory on host mounted into container. You refer to this file/directory using the full file path used on the host.
The problem with a bind mount is you have to have the full host file path which may be different on different hosts. E.g. if you use
/Users/dave it’s going to break if someone else doesn’t have a
While bind mounts are dependent on the directory structure of the host machine, volumes are completely managed by Docker. They’re created in
/var/lib/docker/volumesand you refer to them by name. E.g.
Here’s what this means:
- the first field is the name of the volume. It’s unique on a given host machine
- the second field is the path where the file or directory are mounted in the container