Skip to content

devops-works/ditto

Repository files navigation

DITTO - Docker Image Tracking & Transfer Operation

Monitors upstream container repositories, detects changes, and automatically rebuilds images to your private registry.

Intelligent change detection: uses build context hashing to avoid unnecessary builds.

Quickstart

# Continuous monitoring (default: check every hour)
ditto --config config.yaml

# Single run
ditto --config config.yaml --single-run

# Local-only mode (build without pushing)
ditto --config config.yaml --local-only

CLI flags

Flag Short Default Description
--config -c config.yaml Path to configuration file
--log-level -L INFO Log level (DEBUG, INFO, WARN, ERROR)
--log-format -F text Log format (text, json)
--single-run -s false Execute a single cycle instead of continuous monitoring
--local-only -l false Build images locally without pushing to registry

Configuration

Copy config.example.yaml to config.yaml and customize:

cp config.example.yaml config.yaml
# Edit config.yaml with your registry and images

See config.example.yaml for full documentation of all available options.

Observability

Endpoints available on configured port (default: 8080):

  • /health - Liveness probe (healthy if no critical errors)
  • /ready - Readiness probe (ready if BuildKit + git available)
  • /metrics - Prometheus metrics

Key metrics

  • ditto_builds_total - Total number of builds
  • ditto_build_duration_seconds - Build duration
  • ditto_builds_skipped_total - Builds skipped (no changes)
  • ditto_monitoring_cycles_total - Monitoring cycles
  • ditto_images_configured - Number of configured images
  • ditto_git_operation_duration_seconds - Git operations duration
  • ditto_crane_operations_total - Crane operations (image copy)
  • ditto_errors_total - Errors by component

How it works

  1. Clone upstream repo (sparse checkout)
  2. Detect available versions and OS
  3. Calculate build context hash
  4. Check if image already exists (via labels)
  5. Build only if changes detected
  6. Push to your registry with multiple tags

Docker image & Kubernetes

A pre-built Docker image is provided for easy deployment.

⚠️ The image is currently only compatible with GKE clusters using GCP Artifact Registry and uses GCP Workload Identity for authentication

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages