title: How pull and delete all images except lastest with python docker sdk?
body: <p>It needed to run fresh docker image but without download it every time and delete outdatedd images. The algorithm is:</p>
  
  <ul>
  <li>docker_client.pull()</li>
  <li>docker_client.prune()</li>
  <li>docker_client.run()</li>
  </ul>
  
  <p>The problem is - <code>prune</code> which deletes already downloaded image. If <code>prune</code> is moved on the top - <code>pull</code> command will alwas download new image because all of them deleted with <code>prune</code>. Is there a way to setup <code>pull</code> to fetch only new latest image and <code>prune</code> to keep latest image only?</p>