Skip to content

Repository files navigation

Dockwatch

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.

Dockwatch logo

Go Report Card Apache-2.0 License

What it does

  • 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

Quick start

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 300
docker compose up -d

Or 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 300

Because it runs a published image, dockwatch also keeps itself up to date on each run.

Build the image from source

To hack on dockwatch, build the image locally instead:

git clone https://github.com/fugginold/dockwatch.git
cd dockwatch
docker compose up -d --build

A 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

Common commands

# 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-only

Run dockwatch --help for the full flag list.

Documentation

  • 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.

Build from source

go build -o dockwatch .
./dockwatch --help

License

Apache-2.0 — see LICENSE.md.

About

docker container updater

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages