Hey Guys,
Is there something we can install to automatically remove unused images once the container has been updated by watchtower?
Thanks for your inputs!
cheers
Hey Guys,
Is there something we can install to automatically remove unused images once the container has been updated by watchtower?
Thanks for your inputs!
cheers
Here are some suggestions:
You can use --cleanup for watchtower
assuming you are using the image "containrrr/watchtower", they have a lot of configuration options including automated cleanup of superseded images.
The documentation is available at: https://containrrr.github.io/watchtower/
Thanks All!
I used the below stack :
version: "2"
services:
watchtower:
container_name: watchtower
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_POLL_INTERVAL=86400 #check for updates once per day
restart: unless-stopped
additional info:
(I took me a while to get it correct )
you can add the following label to any stacks that you do not want Watchtower to update.
labels:
- com.centurylinklabs.watchtower.enable=false #To disable Watchtower automatic update
Awesome!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!