Docker Community Forums

Share and learn in the Docker community.

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


(Stéphane Klein) #1



  • docker volume ls
  • docker volume inspect ...

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

Best regards,

(Stéphane Klein) #2

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

(Dvohra) #3

For Docker 1.10
Get container id with
docker ps

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

(Vrms) #4

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

(Dvohra) #5

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

(Stéphane Klein) #6

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.

(Rayps) #7
docker inspect -f '{{ .Mounts }}' c0nt41ner1D