logoalt Hacker News

johannes1234321today at 4:21 PM3 repliesview on HN

Prune is nice, but if you have a bunch of containers which run shirt time for a build step or similar prune would collect those, too. A filter "last used a few months ago" would be useful.


Replies

gioboxtoday at 4:27 PM

I think you can filter on last created, but agree last used would be helpful:

  docker image prune -a --filter "until=24h"
> https://docs.docker.com/reference/cli/docker/image/prune/#fi...
kevinmgrangertoday at 6:22 PM

Any reason why those containers can't be run ephemerally?