title: How to list images and their containers
body: <p>I am deleting dangling docker images.</p>
  
  <p>Before removing these images, I want to see if there are any containers, which are instances from these dangling images.</p>
  
  <p>If so I want to log them and abort the deletion.</p>
  
  <p>So far I did not find any command for that.</p>
  
  <p>My solution would be to get all containers <code>docker ps -a</code> and all dangling images <code>docker images -aqf dangling=true</code> and compare <code>repo + tag</code> from the image with <code>image</code> from the container.</p>
  
  <p>I am using docker <code>1.12</code></p>