Manage Docker Containers Updates With What's up Docker

Introduction

There are multiple ways to update your docker containers to the latest version. The most popular way is to use Watchtower, it can instantly update the docker container whenever a new version is detected.

But there is a potential problem with this, not with the tool itself. Imagine a case when a docker container is updated to the latest version, turn out there is a breaking change that make your container did not work optimally or crashed. Easy, just rollback to the previous version, right? Only if you know exactly what version is problematic, what if this has already happened in several previous versions, but you just realized now because you don't use the broken feature often? It can be hard to track in that case. So I should just manually check for update instead? Nope, just continue reading, I will introduce to two more tools.

Another tool we can use is Diun. The difference between it and Watchtower is that it will only check for updates in a specified interval and send a notification through specified notification system such as Discord when it detects a new version, so the decision is up to us whether to update or not. I have used this tool previously, and it works great for checking updates, but I also want to have a GUI dashboard, so I can see the list of available updates in a nice list and can manually check updates. This is where What's up Docker come in, it combines update watcher with a nice GUI dashboard.

How it works

It is built on 3 concepts:

WATCHERS query your Docker hosts to get the containers to watch
REGISTRIES query the Docker registries to find available updates
TRIGGERS perform actions when updates are available

Features

Docker Compose

services:
  whatsupdocker:
    image: fmartinou/whats-up-docker
    container_name: whatsupdocker
    restart: unless-stopped
    environment:
      - TZ=Asia/Jakarta
      - WUD_TRIGGER_DISCORD_1_URL=https://discord.com/api/webhooks/123/456
      - WUD_TRIGGER_DISCORD_1_BOTUSERNAME=Whatsupdocker
      // Run every Saturday
      - WUD_WATCHER_LOCAL_CRON=0 18 * * 6
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - 3000:3000

Exploration

Home page provide shortcuts to a few main pages and also show information such as number of containers and updates available.

Home Page

Containers page shows a list of containers in drop down format. You can click the drop down to show the information about the container, image and update. At the top of the page, there are two selectors to filter the list by registry and watcher. Next to it, there is a checkbox to to toggle whether to show only the containers that have update available or show all. Lastly there is a watch now button to manually fetch available update.

Containers Page
Container info
Image info
Update info

Auth page provide information of available auth strategies.

Auth Page

Registries page provide information of available docker registries in our system.

Registries Page

Server page provide information of server, logs and storage configuration.

Server Page

Triggers page provide information of available triggers, here it shows information of Discord trigger.

Triggers Page

Watcher page provide information of available watchers.

Watcher Page

Thank you so much for spending time to read this blog post, stay tuned for the next article!