docker-volume-netshare icon indicating copy to clipboard operation
docker-volume-netshare copied to clipboard

Named NFS Volume for adhoc mounts fail

Open milk4candy opened this issue 7 years ago • 2 comments

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.

milk4candy avatar Apr 17 '17 07:04 milk4candy

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.

milk4candy avatar Apr 17 '17 07:04 milk4candy

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

zx1986 avatar May 25 '17 14:05 zx1986