From 1606276d7ef6830db611ae1e34cd8b7ff1e4756d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Doma=C5=84ski?= Date: Thu, 15 Oct 2015 13:49:42 +0200 Subject: [PATCH] cleanup dead containers --- plugins/common/functions | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/common/functions b/plugins/common/functions index 4b2b7de7f..fc424c1f5 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -326,6 +326,10 @@ docker_cleanup() { # shellcheck disable=SC2046 docker rm $(docker ps -a -f 'status=exited' -q) &> /dev/null || true + # delete all dead containers + # shellcheck disable=SC2046 + docker rm $(docker ps -a -f 'status=dead' -q) &> /dev/null || true + # delete unused images # shellcheck disable=SC2046 docker rmi $(docker images -f 'dangling=true' -q) &> /dev/null &