cli
cli copied to clipboard
docker system prune of exited containers
Hi,
This is more of a feature request.
We are using docker system prune -a -f --filter "until=168h" in a daily cron job.
However if the container was created e.g. 2 weeks ago and is stopped at the time for this command to run, it will mean it gets deleted.
It would be great to have additional command like system prune container -a -f --filter "exited=168h" to remove containers exited 1 week ago.
Slightly related to https://github.com/moby/moby/issues/4237 (which is about images, but basically the same use-case)
Hi @thaJeztah ,
Is this (exited filter) still valid? If yes, can I work on it?
Thanks