cli icon indicating copy to clipboard operation
cli copied to clipboard

docker system prune of exited containers

Open 4integration opened this issue 3 years ago • 1 comments

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.

4integration avatar Jun 21 '22 11:06 4integration

Slightly related to https://github.com/moby/moby/issues/4237 (which is about images, but basically the same use-case)

thaJeztah avatar Jul 28 '22 10:07 thaJeztah

Hi @thaJeztah ,

Is this (exited filter) still valid? If yes, can I work on it?

Thanks

ch33hau avatar Oct 20 '22 00:10 ch33hau