Skip to content

Samba - nothing to share + fix #38

@niccokunzmann

Description

@niccokunzmann

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:

  1. Keep the old query intact in case there is an old version
  2. Add a new query with .Config

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions