-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
Observation
When I run
docker run -v /data --name my-data busybox true
docker run --rm -v /usr/local/bin/docker:/docker -v /var/run/docker.sock:/docker.sock svendowideit/samba my-data
I get
my-data has no volumes - nothing to share.
Fix
The error is in line 90.
When I run
docker inspect --format="{{range \$k,\$v := .Volumes}}{{println \$k}}{{end}}" my-data
I get no output. But, when I add .Config it works.
docker inspect --format="{{range \$k,\$v := .Config.Volumes}}{{println \$k}}{{end}}" my-data
Output:
/data
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:
- Keep the old query intact in case there is an old version
- Add a new query with
.Config
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels