DIUN Docker Image Updates
DIUN Docker Image Update Notifier for tracking container image updates.
Overview
DIUN (Docker Image Update Notifier) is an open-source monitoring tool created by CrazyMax that automatically detects when new versions of Docker images become available. Originally developed to solve the challenge of manually tracking updates across multiple containerized applications, DIUN continuously monitors Docker registries and compares them against locally running containers to identify outdated images. The tool supports multiple Docker providers including standalone Docker engines, Docker Swarm clusters, and can integrate with container orchestration platforms through registry scanning.
This DIUN configuration establishes an automated image monitoring system that checks for updates every 6 hours using a cron-based scheduler. The setup connects directly to the Docker daemon through the socket mount, enabling real-time discovery of running containers and their associated images. DIUN analyzes container labels to determine which images should be monitored, then queries their respective registries to detect version changes, security updates, and new releases. The system maintains a local database of image states and version histories to track changes over time.
This stack is particularly valuable for DevOps teams managing multiple containerized environments, homelab enthusiasts running numerous self-hosted services, and system administrators responsible for maintaining security compliance through timely updates. DIUN eliminates the manual overhead of checking dozens of repositories for updates while providing flexible notification options including email, Slack, Discord, Telegram, and webhook integrations to ensure update alerts reach the appropriate team members through their preferred communication channels.
Key Features
- Multi-registry support including Docker Hub, GitHub Container Registry, GitLab Registry, and private registries with authentication
- Flexible container discovery through Docker socket integration with label-based inclusion/exclusion filtering
- Configurable notification providers supporting email, Slack, Discord, Telegram, Matrix, Teams, and custom webhooks
- Cron-based scheduling system with customizable check intervals from minutes to weeks
- Watch list management allowing specific image tracking beyond currently running containers
- Image digest comparison and semantic version analysis for accurate update detection
- Comprehensive logging with JSON and text formats for integration with log aggregation systems
- Template-based notification customization with image details, update summaries, and custom messaging
Common Use Cases
- 1Homelab administrators monitoring self-hosted applications like Nextcloud, Plex, and Bitwarden for security updates
- 2Development teams tracking base image updates for containerized microservices across staging and production environments
- 3Security teams ensuring timely patching of container images to address CVE vulnerabilities
- 4Managed service providers monitoring client container deployments for maintenance scheduling
- 5CI/CD pipeline integration to trigger automated testing when upstream dependencies release new versions
- 6Multi-tenant SaaS platforms tracking third-party service containers for compliance and stability
- 7Enterprise infrastructure teams managing hundreds of containerized applications across multiple clusters
Prerequisites
- Docker Engine 20.10+ with API access and sufficient permissions to read container metadata
- Minimum 128MB RAM allocation for DIUN container and 1GB disk space for image metadata storage
- Network connectivity to Docker registries and notification service endpoints (SMTP, webhook URLs)
- Understanding of Docker labels syntax for configuring per-container monitoring rules
- Valid credentials for private registries and notification services (email servers, Slack tokens)
- Basic cron expression knowledge for customizing update check schedules
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 diun: 3 image: crazymax/diun:latest4 container_name: diun5 environment: 6 - TZ=${TZ}7 - LOG_LEVEL=info8 - LOG_JSON=false9 - DIUN_WATCH_WORKERS=2010 - DIUN_WATCH_SCHEDULE=0 */6 * * *11 - DIUN_PROVIDERS_DOCKER=true12 volumes: 13 - diun_data:/data14 - /var/run/docker.sock:/var/run/docker.sock:ro15 restart: unless-stopped16 networks: 17 - diun-network1819volumes: 20 diun_data: 2122networks: 23 diun-network: 24 driver: bridge.env Template
.env
1# DIUN2TZ=UTCUsage Notes
- 1Add labels to containers to watch
- 2Supports multiple notifiers
- 3Scheduled update checks
- 4Label: diun.enable=true
- 5Notifiers: email, Slack, Discord, etc.
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 diun:5 image: crazymax/diun:latest6 container_name: diun7 environment:8 - TZ=${TZ}9 - LOG_LEVEL=info10 - LOG_JSON=false11 - DIUN_WATCH_WORKERS=2012 - DIUN_WATCH_SCHEDULE=0 */6 * * *13 - DIUN_PROVIDERS_DOCKER=true14 volumes:15 - diun_data:/data16 - /var/run/docker.sock:/var/run/docker.sock:ro17 restart: unless-stopped18 networks:19 - diun-network2021volumes:22 diun_data:2324networks:25 diun-network:26 driver: bridge27EOF2829# 2. Create the .env file30cat > .env << 'EOF'31# DIUN32TZ=UTC33EOF3435# 3. Start the services36docker compose up -d3738# 4. View logs39docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/diun-image-updates/run | bashTroubleshooting
- Permission denied accessing Docker socket: Ensure the Docker socket mount has correct permissions and the DIUN container user can read /var/run/docker.sock
- No containers detected for monitoring: Add 'diun.enable=true' labels to target containers and verify Docker API connectivity
- Failed to connect to registry: Configure registry authentication in DIUN config file and verify network access to registry endpoints
- Notifications not sending: Validate SMTP settings, webhook URLs, or messaging service tokens in environment variables
- High CPU usage during scans: Reduce DIUN_WATCH_WORKERS value from default 20 to 5-10 workers for resource-constrained environments
- Missed updates on private images: Configure registry credentials using DIUN_PROVIDERS_DOCKER_REGISTRY sections with proper authentication tokens
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Ad Space
Shortcuts: C CopyF FavoriteD Download