A daemon that automates Docker container image updates: it watches running containers, checks whether their image digests are stale in the registry, pulls newer images, and recreates the containers using their existing runtime configuration.
- Automatic update detection and rollout
- One-shot update mode for immediate checks
- Optional HTTP API for update and schedule control
- Interactive shell environment for on-the-fly execution
- Prometheus metrics endpoint
- Dependency-aware container restart ordering
Run the published image with Docker Compose:
# docker-compose.yml
services:
dockwatch:
image: ghcr.io/fugginold/dockwatch:latest
container_name: dockwatch
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
command: --interval 300docker compose up -dOr run it directly:
docker run -d \
--name dockwatch \
--restart unless-stopped \
-v /var/run/docker.sock:/var/run/docker.sock \
ghcr.io/fugginold/dockwatch:latest --interval 300Because it runs a published image, dockwatch also keeps itself up to date on each run.
To hack on dockwatch, build the image locally instead:
git clone https://github.com/fugginold/dockwatch.git
cd dockwatch
docker compose up -d --buildA locally-built image has no registry upstream, so dockwatch cannot self-update
it — you'll see harmless "pull access denied" warnings for its own container.
Rebuild with docker compose up -d --build to update.
Check it:
docker ps --filter name=dockwatch
docker logs --tail=100 dockwatch# One immediate check, then exit
dockwatch --run-once
# Check on a schedule (cron) or a fixed interval (seconds)
dockwatch --schedule "@every 6h"
dockwatch --interval 300
# Detect updates without applying them
dockwatch --monitor-onlyRun dockwatch --help for the full flag list.
- docs/HOWTO.md — running, container selection, the HTTP API, metrics, and the full flag / environment-variable reference.
- docs/ARCHITECTURE.md — module layout, the update flow, and where to add new behavior.
go build -o dockwatch .
./dockwatch --helpApache-2.0 — see LICENSE.md.
