Keep your containerized applications up-to-date without manual intervention. Watchtower is a process that runs within its own container and monitors other running Docker containers for new image versions in your chosen registry, such as Docker Hub or a private one.
When it detects that an image has been updated, it automatically performs a series of actions to update your application. The process includes:
This automation saves you from the tedious task of manually checking for updates and redeploying your containers. Simply deploy the Watchtower container, and it will handle the rest, ensuring your applications are always running on the latest, most secure base images.
services:
watchtower:
image: containrrr/watchtower
container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_POLL_INTERVAL=86400
- REPO_USER=${REPO_USER}
- REPO_PASS=${REPO_PASS}
restart: unless-stopped# Optional: Credentials for pulling from private Docker registries
REPO_USER=your_registry_username
REPO_PASS=your_registry_passwordAuto-fetched about 2 hours ago
Auto-fetched about 2 hours ago