How to use your script for all images in 1 run with simple output "image name - update available"

Currently, your script only works with an imagename appended to it: bash docker-image-update-check.sh portainer/portainer-ce this works.

Is it also suppose to work for all local images, by just running bash docker-image-update-check.sh Because that doesn't work for me:

bash docker-image-update-check.sh
Checking for available update for docker.io/:latest...
Local digest: not found
For security reasons, this script only allows updates of already pulled images.

Hopefully it is suppose to work like that and simply output the list of images that have updates?

My goal is to have the following output: imageA name - an update is available, released on XX/YY/ZZZZ imageB name - an update is available, released on XX/YY/ZZZZ

Without the script actually updating anything.

Reason: the end goal here is to email the output. Simply via an msmtp command, common on Arch and Ubuntu systems leveraging your smtp provider. Basically an email notification listing images with updates available.

Do you have any tips how to modify the script slightly to simply check for updates of all local pulled images instead of just one? And how to simplify the output, without showing the long strings?

Edited by ZileXa