Help: Notify on docker conainer updates

Hey guys

This question is not about HA docker container, I am running HA as a VM.

Apart from HA I am using a couple of docker containers for which it would be nice to get notified by HA whenever there are docker container updates available.
I am using docker-compose for all of those containers, so there may or may not be easy ways to implement container update notifications.
Any suggestions on how to set up such notifications?

Thank you in advance.

I have a rest sensor setup to track the latest tag at Docker Hub:

- resource:
  scan_interval: 86400
    name: Mosquitto Image
      - creator
      - id
      - images
      - last_updated
      - last_updater
      - last_updater_username
      - name
      - repository
      - full_size
      - v2
      - tag_status
      - tag_last_pulled
      - tag_last_pushed
      - media_type
      - digest
    value_template:  >-
      {{ value_json.tag_status }}

Then I have an automation that is triggered on a state change for that sensor. In my case I set an input boolean with the same name as the sensor so I have a visual list of stuff that needs updating (and can ignore the update by turning it off. I’ve simplified this a bit for the example, as I’m tracking other updates from things like GitHub, HACS, etc.

alias: System Check for Component Updates
description: ""
  - platform: state
      - sensor.mariadb_image
      - sensor.iperf3_image
      - sensor.nextpvr_image
      - sensor.mosquitto_image
    attribute: last_updated
condition: []
  - choose:
      - conditions:
          - condition: template
            value_template: "{{trigger.to_state.entity_id.startswith('binary_sensor.')}}"
          - service: input_boolean.turn_on
            data: {}
              entity_id: input_boolean.{{trigger.to_state.entity_id[14:]}}
      - service: input_boolean.turn_on
        data: {}
          entity_id: input_boolean.{{trigger.to_state.entity_id[7:]}}
mode: single

And then one more automation to trigger an actual notification:

alias: System Notify on Updates Available
description: ""
  - platform: state
      - input_boolean.iperf3_image
      - input_boolean.mariadb_image
      - input_boolean.mosquitto_image
      - input_boolean.nextpvr_image
    to: "on"
    from: "off"
condition: []
  - service: persistent_notification.create
      title: Updates Available
      message: "{{ }}"
mode: queued

It’s probably more complicated than it needs to be, but it does work. If you don’t need a visual list of updates, you could probably have the notification trigger in the first automation and not have the second automation at all.

There is a custom integration that can do this: