docker-volume-netshare
docker-volume-netshare copied to clipboard
Named NFS Volume for adhoc mounts fail
In func resolveName in /netshare/drivers/util.go, it seems I can use "#" symbol to name a volume using nfs driver on the fly when using docker run. For example, If I run following command
$ docker run -i -t --volume-driver=nfs -v nfshost/path#volume_name:/mount ubuntu /bin/bash
It should create a NFS volume named "volume_name" for container on the fly.
But it fail to do so.
It looks like there is a problem on the if statement in line 52 in /netshare/drivers/nfs.go. It will never be true since the "found" variable will always be undefined.
Does this
$ docker run -i -t --volume-driver=nfs -v 'nfshost/path#volume_name:/mount' ubuntu /bin/bash
work?
https://github.com/ContainX/docker-volume-netshare/blob/master/netshare/drivers/util.go#L35