-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Describe the bug
I've been using watchtower for the past year or so and I really like how seamless it runs, but I've never been able to get the WATCHTOWER_CLEANUP option to work.
My docker_compose.yml is as follows.
watchtower:
image: containrrr/watchtower
container_name: watchtower
environment:
- WATCHTOWER_HTTP_API_METRICS=true
- WATCHTOWER_HTTP_API_TOKEN=censored
- WATCHTOWER_NOTIFICATION_REPORT=true
- WATCHTOWER_NOTIFICATION_URL=generic://notifiarr.com/api/v1/notification/watchtower>
- WATCHTOWER_CLEANUP=true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports: - 800:8080
restart: unless-stopped
I removed and restarted the container, so I don't have the logs at the moment, but once it runs an update I'll add them to this issue. I did not see any mention of the cleanup in the logs, though.
Steps to reproduce
- Pull and run Watchtower using my docker_compose.yml file.
- Wait for a container to update.
- Get frustrated when your SSD fills up in three days.
Expected behavior
Cleanup option should be removing old container images upon completing updates.
Screenshots
No response
Environment
Docker 27.3.1 on Debian 12 x86_64
Your logs
time="2025-04-29T04:03:30Z" level=info msg="Watchtower 1.7.1"
time="2025-04-29T04:03:30Z" level=info msg="Using notifications: generic"
time="2025-04-29T04:03:30Z" level=info msg="Checking all containers (except explicitly disabled with label)"
time="2025-04-29T04:03:30Z" level=info msg="Scheduling first run: 2025-04-30 04:03:30 +0000 UTC"
time="2025-04-29T04:03:30Z" level=info msg="Note that the first check will be performed in 23 hours, 59 minutes, 59 seconds"
Additional context
No response