On 05/10/2015 15:04, Brian Candler wrote:
It's not clear to me whether a data volume can mount data from the
host filesystem, and then another container can in mount that data
container successfully. (I need to test this).
I tested it, and it works.
mkdir -p /shared/scratch1
mount trusty2:/media/scratch1 /shared/scratch1
docker run -v /shared:/shared --name shared -it ubuntu /bin/bash
...
# exit
docker run --volumes-from shared --name client -it ubuntu /bin/bash
...
# exit
* Both containers were able to read/write files under /shared/scratch1/
which in turn was on a remote NFS server
* Nothing was created under /var/lib/docker/volumes/
(which is where volumes created by "-v /foo" rather than "-v /foo:/foo"
are created)
and therefore there are no orphan volumes to clean up afterwards.
Regards,
Brian.
|