title: Docker prune images not used in the last X hours
body: <p>Is there a way to do <code>docker prune image</code> to get rid of images if either they or their intermediary layers have not been used in the last X hours?</p>
  
  <p>The purpose is: Say a build has created intermdiary and final image(F1). A subsequent build can use the intermediary image. While this subsequent build is running, if I run <code>docker image prune -f -a</code> in another window, then Docker will delete the image F1 (assuming it is unused) and it's intermediary images. Thus the build in progress even if it had used intermediary image will have to rebuild the intermediary image. If there is a filter setting on the prune command based on last used then it will be helpful.</p>