From 34c5b538578faabd2cbdc66a760e4c799be65f2c Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 8 Sep 2015 11:21:38 -0400 Subject: [PATCH] Do not delete containers with the label dokku.service [ci skip] --- plugins/common/functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/common/functions b/plugins/common/functions index 282c5715c..be4884efe 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -323,12 +323,12 @@ release_and_deploy() { docker_cleanup() { # delete all non-running containers - # if a container has the label `dokku`, + # 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' | sort) -3) &> /dev/null || true + 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 # delete unused images # shellcheck disable=SC2046 docker rmi $(docker images -f 'dangling=true' -q) &> /dev/null &