Why docker volume inspect don't display the relation between volume and container?

Hi,

why:

  • docker volume ls
  • docker volume inspect ...

don’t display the relation between volume and container, which container use this volumes ?

Best regards,
Stéphane

1 Like

Is this worth a feature request ? (on github issue)

1 Like

For Docker 1.10
Get container id with
docker ps

Subsequently,
docker inspect -f ‘{{ .Volumes }}’ containerid

1 Like

Thx, still it would be slick wether inspecting the volume would show containers it is mounted to as well. So +1 to a feature request

As the volume is mounted in the container the information is available in the container, not the volume.

Yes, I know but it’s not useful to have global view of relation between containers and volumes :frowning: I need to look one by one.

docker inspect -f '{{ .Mounts }}' c0nt41ner1D