docker icon indicating copy to clipboard operation
docker copied to clipboard

docker_volume driver & options

Open holmesb opened this issue 8 years ago • 2 comments

Cookbook version

v2.15.6

Chef-client version

v13.1.31

Platform Details

Ubuntu

Scenario:

Create docker_volume with options

Steps to Reproduce:

docker_volume 'testnfs' do
  driver 'nfs'
  opts 'share=nfs-server:/export/data'
  action :create
end

Expected Result:

docker volume is created with driver and options

Actual Result:

root@server/]$ docker inspect testnfs
[
    {
        "Driver": "local",
        "Labels": null,
        "Mountpoint": "/var/lib/docker/volumes/testnfs/_data",
        "Name": "testnfs",
        "Options": {},
        "Scope": "local"
    }
]

holmesb avatar Jun 02 '17 20:06 holmesb

Thanks for reporting this issue. Based on the code these attributes are most likely a copy pasta from some of the other resources (and why this doesn't have clear documentation in the README).

iennae avatar Jul 11 '17 18:07 iennae

https://github.com/chef-cookbooks/docker/blob/master/libraries/docker_volume.rb#L23 needs to be updated to actually take opts. documentation needs to be updated to eliminate driver property most likely (unless there is a way to pass driver to Docker::Volume..)

iennae avatar Jul 11 '17 18:07 iennae