From 88bd50abaf366d8c01fcbfaefa4a883c6e02d00a Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 8 Sep 2015 14:35:00 -0400 Subject: [PATCH] Revert change that whitelisted dokku-labeled containers Rather than having a one-off hack for "blessed" containers, we should solve the issue properly. As that would take a bit more work, reverting to the previous state is preferred. Better that we solve a problem problem than with a hack that we'll need to roll back in the future. Refs #1220 [ci skip] --- plugins/common/functions | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/common/functions b/plugins/common/functions index be4884efe..1a12eeb6b 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -323,12 +323,8 @@ release_and_deploy() { docker_cleanup() { # delete all non-running containers - # if a container has the label `dokku.service`, - # then that container is not deleted. - # This can be used to mark data containers - # as non-removable by the cleanup function # shellcheck disable=SC2046 - docker rm $(comm <(docker ps -aq -f 'status=exited' | sort) <(docker ps -aq -f 'status=exited' -f 'label=dokku.service' | sort) -3) &> /dev/null || true + docker rm $(docker ps -a -f 'status=exited' -q) &> /dev/null || true # delete unused images # shellcheck disable=SC2046 docker rmi $(docker images -f 'dangling=true' -q) &> /dev/null &