Skip to content

docker volume inspect doesn't show connected containers. #31436

@intesar

Description

@intesar

Description

Steps to reproduce the issue:

  1. docker volume -d local local-100
  2. docker run -d -v local-100:/opt/ nginx:latest
  3. docker volume inspect local-100

Describe the results you received:
missing attached containers.
[
{
"Driver": "local",
"Labels": {},
"Mountpoint": "/var/lib/docker/volumes/local-100/_data",
"Name": "local-100",
"Options": {},
"Scope": "local"
}
]

Describe the results you expected:
[
{
"Driver": "local",
"Labels": {},
"Mountpoint": "/var/lib/docker/volumes/local-100/_data",
"Name": "local-100",
"Containers": []
"Options": {},
"Scope": "local"
}
]

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Client:
 Version:      1.13.1
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 06:42:29 2017
 OS/Arch:      linux/amd64

Server:
 Version:      1.13.1
 API version:  1.26 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   092cba3
 Built:        Wed Feb  8 06:42:29 2017
 OS/Arch:      linux/amd64
 Experimental: false

Output of docker info:

Containers: 6
 Running: 5
 Paused: 0
 Stopped: 1
Images: 62
Server Version: 1.13.1
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 315
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1
runc version: 9df8b306d01f59d3a8029be411de015b7304dd8f
init version: 949e6fa
Security Options:
 apparmor
Kernel Version: 4.4.0-51-generic
Operating System: Ubuntu 14.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.945 GiB
Name: dchq-gak
ID: 2MMO:IKKV:QTKW:SS3E:E5MY:7IIV:PBAV:PWDE:BMV5:FMG5:PG44:AQ2S
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: hypergrid
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.):

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiAPIkind/enhancementEnhancements are not bugs or new features but can improve usability or performance.version/1.13

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions