-
Notifications
You must be signed in to change notification settings - Fork 18.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker volume inspect doesn't show connected containers. #31436
Comments
Can you describe the use case for this? You can do the opposite; to get a list of containers that use a specific volume, use |
This is similar to 'docker network inspect bridge'. |
It should do so; did you have a situation where it allowed you to delete a volume that was in use? |
I can delete a volume which in use. e.g. docker volume rm -f local-100. Shouldn't the same behavior be applied to volumes? |
Yes, |
A use case to be able to see which containers are connected to a volume would be to audit who is accessing what information without having to perform an expensive operation of inspecting every container. |
@mbentley you can do that with |
True, you can do it that way, but it's not particularly intuitive when there's a command to "inspect" volumes that could just give you the relevant information. |
docker ps --filter volume= it worked for me. Thanks for your help. |
Description
Steps to reproduce the issue:
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
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: