Open niccokunzmann opened 8 years ago
Pull request 32 fixes this.
To my case under 1.9.1, I just see null
under .Config.Volumes
, therefore I can't use samba now. Any hints ?
"Config": { ... "Cmd": [ "true" ], "Image": "busybox", "Volumes": null, ...
see sto question: http://stackoverflow.com/questions/35032368/docker-volumes-doesnt-exist-for-data-container-in-1-9-1
In sto, VonC mentioned to use Mounts
instead of .Config.Volumes
, do you agree ?
Could you try the line on the command line, post the output and adapt it to the mounts? I do not know:
docker inspect --format="{{range \$k,\$v := .Config.Volumes}}{{println \$k}}{{end}}" my-data
@niccokunzmann I made a simple PR based on your solution with new checking for Mounts
, or you can redo your PR since it is too complex and modify too much.
Don't have time and best solution to this fix (my PR has issues), any one to provide a simple PR for this ?
Observation When I run
I get
Fix
The error is in line 90. When I run
I get no output. But, when I add
.Config
it works.Output:
Docker Version: 1.9.1 API Version: 1.21
Solution
I guess this is due to old docker versions that hat a
.Volumes
attribute. I suggest the following:.Config