DIUN Viewer is a lightweight web dashboard for DIUN (Docker Image Update Notifier).
It provides a simple UI to inspect images, view update events, and correlate image digests with DIUN webhook notifications.
- Web UI for DIUN images and events
- Status badge per image (up to date / outdated)
- Persistent event storage in a JSON file
- DIUN webhook ingestion
- Automatic cleanup of obsolete events based on current digests
- Auto‑refresh of data every few minutes
- No external database, no build step, no heavy frameworks
-
Backend: Go HTTP server
- Serves static frontend
- Uses Docker SDK (
ImageList) to list local Docker images - Uses Diun image list -raw to list Diun image list
- Receives DIUN webhook events
- Stores events in
events.json - Exposes a small JSON REST API (
/api/images,/api/events, etc.)
-
Frontend: Static HTML + JS
- Bootstrap 5 + AdminLTE 4 layout
- jQuery + DataTables for tables
- FontAwesome + Bootstrap Icons for icons
- Vanilla JS (
app.js) for logic
High‑level flow:
- DIUN sends webhook events to
/api/diun-webhook - Go server appends events to
events.json - Frontend calls
/api/events,/api/imagesand/api/diunImages - Frontend correlates Docker image with Diun Images and renders status badges
-
GET /api/images
Returns Docker SDK (ImageList) to list local Docker images. -
GET /api/diunImages
Returns Diun images by diun image list -raw . -
GET /api/events
Returns stored events after cleaning out entries whose digest is no longer present in DIUN’s current image list. -
POST /api/events/delete
Deletes events:- Empty array
[]→ delete all events - Array of IDs
[1, 2, 3]→ delete only those events
- Empty array
-
POST /api/diun-webhook
Receives DIUN webhook JSON and appends it to the event store.
The server reads a simple key/value config file diunViewer.cfg, for example:
PUBLIC_DIR=/tools/public
LISTEN_PORT=80
EVENTS_FILE=/data/events.json
DIUN_BINARY=diun
LOG_LEVEL=debug- PUBLIC_DIR – directory containing static frontend files
- LISTEN_PORT – port for the HTTP server (e.g.
80) - EVENTS_FILE – path to the JSON file used to persist events
- DIUN_BINARY – path or name of the DIUN binary
- LOG_LEVEL –
infoordebug
- Bootstrap 5 – layout and components
- AdminLTE 4 – sidebar and dashboard styling
- jQuery 3.6 – DOM helpers
- DataTables 1.13 – sortable/searchable tables
- FontAwesome 5 and Bootstrap Icons – icons
- Vanilla JavaScript – application logic (
app.js)
go build -o diunViewer
./diunViewerEnsure:
- The config file (e.g.
/tools/diunViewer.cfg) exists and is valid PUBLIC_DIRpoints to the directory containingindex.html,app.js, CSS, etc.DIUN_BINARYis reachable (in PATH or full path)
webhook only if you want to have it in Diun Viewer
- DIUN_NOTIF_WEBHOOK_ENDPOINT=http://192.168.1.26/api/diun-webhook
- DIUN_NOTIF_WEBHOOK_METHOD=POST
- DIUN_NOTIF_WEBHOOK_TIMEOUT=10s
services:
diun:
image: crazymax/diun:latest
container_name: diun
restart: always
networks:
qnet-static-eth0-79e6cc:
ipv4_address: 192.168.1.26
mac_address: 02:42:17:48:85:49
volumes:
- /share/Container/Diun/data:/data
- /var/run/docker.sock:/var/run/docker.sock
- /share/Container/Diun/tools:/tools
ports:
- "80:80"
dns:
- 192.168.1.53
- 8.8.8.8
environment:
- TZ=Europe/Zagreb
- DIUN_PROVIDERS_DOCKER=true
- DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT=true
- DIUN_PROVIDERS_DOCKER_WATCHSTOPPED=true
- DIUN_WATCH_SCHEDULE=0 */6 * * *
- DIUN_NOTIF_WEBHOOK_ENDPOINT=http://192.168.1.26/api/diun-webhook
- DIUN_NOTIF_WEBHOOK_METHOD=POST
- DIUN_NOTIF_WEBHOOK_TIMEOUT=10s
entrypoint: ["/tools/entrypoint.sh"]
networks:
qnet-static-eth0-79e6cc:
external: trueDIUN Viewer is not baked into the crazymax/diun image.
Instead, it is injected at runtime using a bind-mounted /tools directory and a custom entrypoint.sh.
This approach allows the DIUN container to be updated freely while keeping:
- The DIUN Viewer binary
- The configuration file
- The event storage
- The custom entrypoint script
fully persistent and untouched.
- A host directory is mounted into the container at
/tools:
/share/Container/Diun/tools:/toolsThis directory contains:
- diunViewer — the Go DIUN Viewer server binary
- diunViewer.cfg — configuration file
- entrypoint.sh — custom startup script
The container’s entrypoint is overridden:
entrypoint: ["/tools/entrypoint.sh"]The custom entrypoint:
- Starts the DIUN Viewer webserver in the background
- Starts the official DIUN binary normally
- The DIUN container runs normally.
- DIUN Viewer runs alongside it inside the same container.
- Updates to the DIUN image do not affect the Viewer.
- All Viewer files remain persistent on the host.
- No modification of the DIUN image is required.
This method keeps the DIUN container stateless while allowing DIUN Viewer to coexist safely and survive upgrades.
MIT License
See LICENSE for details.
| Images | Events |
|---|---|
![]() |
![]() |
| Image Details |
|---|
![]() |



