From 8c47186e6585842966ee0837502cd7abd82b6d7b Mon Sep 17 00:00:00 2001 From: albertlatacz Date: Fri, 6 Jan 2017 10:11:35 +0000 Subject: [PATCH] filter to stop only this repo --- bin/restart-after-tag.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/restart-after-tag.sh b/bin/restart-after-tag.sh index 0a571b4..e5d5ef1 100755 --- a/bin/restart-after-tag.sh +++ b/bin/restart-after-tag.sh @@ -17,8 +17,8 @@ function restartContainer() { COMMAND="$2" echo "New version of ${REPOSITORY} available. Deploying..." docker stop $(docker ps -q --filter ancestor=${REPOSITORY}) - docker rm $(docker ps -q -f status=exited) - docker rmi $(docker images -q -f dangling=true) + docker rm $(docker ps -q --filter status=exited --filter ancestor=${REPOSITORY}) + docker rmi $(docker images -q --filter dangling=true --filter ancestor=${REPOSITORY}) docker pull ${REPOSITORY} eval "${COMMAND} ${REPOSITORY}" }