Watchtower: Automates Docker container base image updates
Automated Docker container updates via registry polling.
Learn more about watchtower
Watchtower is a containerized process written in Go that automates the update cycle for Docker containers by monitoring image registries for changes. It works by periodically checking for new versions of container images, then orchestrating the replacement of running containers with updated versions while preserving their deployment parameters. The tool integrates with the Docker daemon through the Docker socket and supports multiple notification backends for alerting users to update events. It is designed for homelab and local development environments rather than production Kubernetes deployments.
Automated Image Monitoring
Polls Docker Hub and private registries on configurable schedules to detect new image versions. Eliminates manual update checks and CI/CD dependencies for homelab and local development workflows.
Container State Preservation
Captures and reapplies original deployment configuration during updates, including environment variables, volumes, and port mappings. Containers restart with updated images without manual reconfiguration.
Multi-Channel Notifications
Integrates with multiple notification backends to alert on update events. Provides visibility into automated container replacements across different communication platforms.
package main
import (
"github.com/containrrr/watchtower/pkg/container"
"github.com/docker/docker/client"
)
func main() {
dockerClient, _ := client.NewClientWithOpts(client.FromEnv)
containers, _ := container.ListContainers(dockerClient, container.Filter{})
for _, c := range containers {
if c.IsWatchtowerLabel() {
c.UpdateImage(dockerClient)
}
}
}Patch release fixing instance cleanup when scope is not configured.
- –Fixes crash during instance cleanup when no scope label is set on monitored containers.
- –Release notes do not specify breaking changes or new requirements; safe drop-in upgrade.
Maintenance release adding container exclusion by name and fixing healthcheck handling; no breaking changes noted.
- –Use new `--label-exclude` flag or env to explicitly exclude containers by name from monitoring.
- –Upgrade includes fixes for missing healthcheck keys and ensures new healthcheck configs apply correctly.
Adds health-check CLI flag, JSON logging, label precedence control, and no-pull label; fixes network alias handling and registry parsing bugs.
- –Use --health-check flag to enable container health monitoring and --label-take-precedence to prioritize label-based config over CLI args.
- –Apply com.centurylinklabs.watchtower.no-pull label to skip image pulls for specific containers; JSON logging now available via formatter option.
See how people are using watchtower
Top in Cloud & DevOps
Related Repositories
Discover similar tools and frameworks used by developers
build-push-action
GitHub Action for building and publishing Docker images.
aws-cdk
Programming language abstractions that synthesize into CloudFormation templates.
OpenLens
Community-built Kubernetes IDE without authentication requirements.
configure-aws-credentials
GitHub Action for AWS credential resolution in workflows.
renovate
Automated dependency updates via pull requests across 90+ package managers.