Review: DIUN – A docker image update notification app

Diun is an application that is embraced by the self-hosting community and for the right reasons. In recent years, many people have entered the self-hosting with old hardware with a Linux OS, which can run docker applications. This has helped a lot of people to make life easier one way or the other. There are a few applications that help you with managing Docker and Docker Compose as well, but most of them don’t allow auto updates or sometimes you don’t want the application to be on auto-update, ex, Immich, which is being actively developed and has breaking changes more often than not.

That’s where DIUN comes in, it’s a light weight application that keeps track of your currently hosted docker images and informs you of any updates. That’s it. Nothing more nothing less. You can choose the mode of communication, which itself is long enough to confuse you.

  • Ampq
  • Discord
  • Gotify
  • Mail
  • Matrix
  • MTQQ
  • Ntfy
  • Pushover
  • Rocker.Chat
  • Script
  • Signal
  • Slack
  • Teams
  • Telegram
  • Webhook

Of course, you can configure each of these according to your needs and configure the messages you get as well. This is a perfect solution if you don’t want to automatically update/redeploy stacks.

Installation:

This is the easiest part, you can start hosting in multiple ways. You can install it on a server directly using binaries, the instructions can be found here or you can go the easier way, just use the docker image. The configuration for the docker image is also easy,

services:
  web:
    container_name: diun
    image: crazymax/diun:latest
    command: serve
    volumes:
      - data:/data
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - TZ=America/Los_Angeles
      - DIUN_WATCH_SCHEDULE=0 */12 * * *
      - DIUN_PROVIDERS_DOCKER=true
      - DIUN_NOTIF_MAIL_HOST=<mail server host>
      - DIUN_NOTIF_MAIL_PORT=25
      - DIUN_NOTIF_MAIL_USERNAME=<[email protected]>
      - DIUN_NOTIF_MAIL_PASSWORD=<email-password>
      - DIUN_NOTIF_MAIL_FROM=<[email protected]>
      - DIUN_NOTIF_MAIL_TO=<[email protected]>
    labels:
      - diun.enable=true
    hostname: live
    deploy:
      restart_policy:
        condition: on-failure
        delay: 5m
        max_attempts: 3
        window: 3m
    networks:
      homelan

volumes: 
  data: 

networks:
  homelan:

In the above sample, we have set the mandatory environment variables, Timezone(TZ), the CRON value for the job interval (DIUN_WATCH_SCHEDULE). All others are optional, infact if you want DIUN to run directly all thetime, you can remove the CRON watch scheduler. You can check out all the environment variables here.

Usage

You can manually enable/disable the the docker images that you want DIUN to track. You can do so using the labels field in docker-compose to set diun.enable=true for a image to be track. This way you can make sure you only track single instance of any image. You can set the value to false if you don’t want any docker service image to be tracked.

You can also set the host name so that you can differentiate between the environments that has updates. This makes it easier to track multiple environments using a single communication method to track updates.

Conclusion

In short, DIUN is a great light-weight option to get notified about your docker image updates. With the customizations it provides, it should be a no brainer to use it for maintaing application updates for your docker instance and to make sure you are have current security updates for all your applications. For complete details you can visit the official website.

Leave a Comment