I’ve been using Watchtower to manage the updates to my containers via Portainer for a number of months. It works pretty well.
I always had to remember to manually tidy up old images once they had been updated, that is until I discovered the commands below.
The commands
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_INCLUDE_STOPPED=true
- WATCHTOWER_REVIVE_STOPPED=false
What do they do?
- WATCHTOWER_CLEANUP=true – This command tells watchtower to delete old images once they’ve been updated.
- WATCHTOWER_INCLUDE_STOPPED=true – This will allow watchtower to update all containers whether they are running or stopped.
- WATCHTOWER_REVIVE_STOPPED=false – This will tell watchtower not to restart stopped containers after updating them.
There we have it some quick commands that will save a lot of time and hassle when dealing with containers.

Leave a comment