Sign inSign up

zachbg/docker-diun

By zachbg

•Updated 6 months ago

Get notified (Discord, Slack, email) when Docker images have updates available

Image
1

1.5K

zachbg/docker-diun repository overview

⁠Docker DIUN (Docker Image Update Notifier)

Get notified when your running Docker images have updates available. Know about security patches and new versions before they become a problem.

⁠Why?

You deploy containers and forget about them. Meanwhile, base images get CVE patches, application updates ship, and you're running month-old vulnerable code. DIUN watches your running containers and alerts you when newer image versions exist.

⁠Quick Start

services:
  diun:
    image: zachbg/docker-diun:latest
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - diun-data:/data
    environment:
      DIUN_WATCH_INTERVAL: 21600
      DIUN_WEBHOOK_URL: https://discord.com/api/webhooks/xxx/yyy
      DIUN_WEBHOOK_TYPE: discord

  # Label containers you want to watch
  nginx:
    image: nginx:1.27
    labels:
      diun.enable: "true"

volumes:
  diun-data:

⁠Environment Variables

VariableDefaultDescription
DIUN_WATCH_INTERVAL21600Check interval in seconds (default: 6h)
DIUN_WATCH_LABELdiun.enableLabel to filter containers
DIUN_WATCH_ALLfalseWatch all containers (ignore label)
DIUN_WEBHOOK_URLNotification webhook URL
DIUN_WEBHOOK_TYPEgenericdiscord, slack, email, or generic
DIUN_SMTP_HOSTSMTP server for email notifications
DIUN_SMTP_TOEmail recipient
DIUN_SMTP_FROMdiun@localhostEmail sender

⁠Container Labels

LabelDescription
diun.enable=trueWatch this container for updates

⁠Examples

⁠Watch all containers
environment:
  DIUN_WATCH_ALL: "true"
  DIUN_WATCH_INTERVAL: 3600
⁠Slack notifications
environment:
  DIUN_WEBHOOK_URL: https://hooks.slack.com/services/xxx/yyy/zzz
  DIUN_WEBHOOK_TYPE: slack
⁠Email notifications
environment:
  DIUN_WEBHOOK_TYPE: email
  DIUN_SMTP_HOST: smtp.gmail.com:587
  DIUN_SMTP_TO: [email protected]
  DIUN_SMTP_FROM: [email protected]

Tag summary

Content type

Image

Digest

sha256:6840a9e10…

Size

32.6 MB

Last updated

6 months ago

docker pull zachbg/docker-diun