Skip to content

Container list flooded with containrrr/watchtower containers #1600

Answered by piksel
daniel-lo asked this question in General
Discussion options

You must be logged in to vote

By, "container list", do you mean the output of docker ps -a?
If so you could filter the list by the label that watchtower uses to identify itself:

docker ps --filter label=com.centurylinklabs.watchtower=true --filter status=exited -a

and pass that to docker rm:

for c in $(docker ps --filter label=com.centurylinklabs.watchtower=true --filter status=exited -a -q); do docker rm $c; done

Not sure how you ended up with multiple instances though, but maybe it was caused by some bad release (it's surprisingly hard to not screw up watchtower releases due to it's self-updating nature). During normal operation watchtower should clean up any old instances of itself after updating.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by simskij
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants