docker
docker copied to clipboard
docker_volume driver & options
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"
}
]
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).
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..)