Deep Dive & Technical Overview
Docker Image Updater
Automatic container image updates for Docker Compose environments — with a premium real-time dashboard.
Project Overview
Modern DevOps teams invest heavily in CI/CD pipelines that build and push Docker images to container registries. However, getting those new images running in production — especially in Docker Compose environments — often still requires manual intervention: SSH into the server, pull the new image, restart the service, and verify it's healthy.
Docker Image Updater eliminates this gap entirely.
It is a self-hosted, lightweight agent that:
- Watches your container registries for new image versions on a configurable interval
- Automatically pulls the new image and recreates affected containers
- Verifies the rollout is complete before marking the service as
Synced - Exposes a real-time web dashboard so your team can see status, manage rollbacks, and trigger actions — all from a browser
Whether you run a handful of self-hosted services or a fleet of Docker Compose stacks, Docker Image Updater gives you ArgoCD-style GitOps UX without requiring Kubernetes.
How It Works: Step-by-Step
Step 1 ── Scan Registry
Every CHECK_INTERVAL seconds, the engine authenticates with the configured registry (ECR, ACR, GCR, etc.) and fetches the latest tagged image list.
Step 2 ── Detect New Tag
The 14-tier sorting algorithm ranks candidates by: push timestamp → semver → timestamp tag → build ID → generic. It filters out pinned tags and ignored tags.
Step 3 ── Trigger Update
If the desired tag differs from current_tag in the compose file, the engine marks the service as deploying=true and saves the state (UI badge immediately shows "Deploying…").
Step 4 ── Pull New Image
docker compose -f <path> pull. Layers are downloaded in parallel per service.
Step 5 ── Replace Container
The old container is recreated with the new image. ROLLBACKS use --force-recreate to ensure any stale process state is overwritten.
Step 6 ── Vulnerability Scan
If enabled, the engine triggers a Trivy scan on the newly deployed image, generating a summary for the UI and an in-depth report available for download.
Step 7 ── Confirm Running
The engine verifies the deployment command exited cleanly, confirming Docker restarted the container successfully.
Step 8 ── Auto Sync
current_tag is updated. If this was a manual rollback, pinned_tag is cleared and newer tags are added to ignored_tags to keep the service pinned at the rolled-back version.
Quick Logic Flow
Key Features
| Feature | Description |
|---|---|
| 🔍 Automatic Image Detection | Polls registries every N seconds and detects new tags or digest changes |
| 🚀 Rolling Container Updates | Pulls image and recreates containers with zero manual SSH required |
| 🩺 Health Verification | Tracks deploying state and only marks service Synced only after container is confirmed running |
| 🔄 Auto Service Sync | After a successful rollout, service state automatically transitions to Synced |
| 🦀 Rust Core Engine | High-performance, memory-safe backend built with Axum and Tokio — ~15 MB RAM footprint |
| 🌐 Multi-Registry Support | AWS ECR, Docker Hub, Azure ACR, GCP GCR/AR, Harbor, Huawei SWR, DigitalOcean DOCR — all 7 active |
| 🔄 Atomic Rollbacks | Revision history shows last 5 tags per service; one-click rollback auto-deploys and auto-syncs |
| 🖥️ Premium Dashboard | Glassmorphism-inspired, dark-mode web UI with live status & controls |
| 🛡️ Vulnerability Scanning | Integrated Trivy scanning with detailed CVE reports |
| 🏷️ Intelligent Tag Sorting | 14-tier priority algorithm handles Semver, timestamps, build IDs, etc. |
Supported Registries
| Registry | Provider | Auth Method | Status |
|---|---|---|---|
| AWS ECR | Amazon Web Services | IAM Role / Access Key + Secret | Active |
| Docker Hub | Docker Inc. | Username + Password / Token (public or private) | Active |
| Azure ACR | Microsoft Azure | Admin credentials / Service Principal (AcrPull) | Active |
| GCP GCR / Artifact Registry | Google Cloud | Access Token / Service Account JSON | Active |
| Harbor | CNCF / Self-hosted | Username + Password (robot accounts supported) | Active |
| Huawei SWR | Huawei Cloud | AK/SK credentials / Pre-generated login key | Active |
| DigitalOcean DOCR | DigitalOcean | Personal Access Token (PAT) | Active |
All seven registries are supported by generate_env.sh auto-configuration — select your registry at runtime and the script generates a ready-to-use .updater.env in seconds.
System Architecture
Auto-Configuration: generate_env.sh
Instead of manually editing updater.env, run generate_env.sh to auto-detect running containers and produce a ready-to-use config in under 5 minutes.
- Presents an interactive registry menu — choose from all 7 providers
- Docker Hub shows a sub-menu: Public / Private / Both
- Scans only containers belonging to the selected registry — other registries are ignored
- Auto-detects account IDs, regions, project IDs, and namespaces from running container image URIs
- Preserves existing credentials on re-runs — never overwrites tokens you've already set
IAM / Credentials Setup Scripts
Each cloud provider has a dedicated role script that creates the minimum-permission service account or IAM role required by the updater, then outputs the exact values to paste into updater.env.
| Script | Cloud | What It Creates | Outputs |
|---|---|---|---|
ecr-role.sh |
AWS | IAM Role with ECR read policy | AWS_ROLE_ARN |
acr-role.sh |
Azure | Service Principal with AcrPull role | AZURE_REGISTRY, AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET |
gcp-role.sh |
GCP | Service Account with artifactregistry.reader or storage.objectViewer |
GCP_REGISTRY_URL, GCP_PROJECT, GCP_SERVICE_ACCOUNT_JSON |
harbor-role.sh |
Harbor | Robot account via /api/v2.0/robots (project-scoped or system-level) |
HARBOR_URL, HARBOR_USERNAME, HARBOR_PASSWORD |
swr-role.sh |
Huawei | Validates AK/SK by deriving HMAC-SHA256 login key and testing docker login |
SWR_REGION, SWR_ORGANIZATION, SWR_ACCESS_KEY, SWR_SECRET_KEY |
docr-role.sh |
DigitalOcean | Validates PAT via DO API and tests docker login registry.digitalocean.com |
DO_REGISTRY, DO_TOKEN |
All scripts follow the same pattern: check for required CLI tools, create or validate credentials with minimum permissions, then print the exact KEY=VALUE lines to paste into updater.env.
Project Folder Structure
Security Matrix
| Risk | Mitigation Strategy |
|---|---|
| Docker socket exposure | Mount /var/run/docker.sock only on trusted servers; run the agent as a non-exposed internal service. |
| Plaintext credentials | Passwords are hashed with SHA256 in-memory; .updater.env is gitignored and protected with local FS permissions. |
| AWS Cloud Access | Uses IAM Roles with Least Privilege (Read-only ECR access) instead of long-lived static keys. |
| Network exposure | Dashboard binds to 8080; recommend running behind an authenticated reverse proxy (Nginx/Traefik) with TLS. |