Check for Docker Image Updates
For certain docker-driven services, I would like to check regularly for new versions. One way to do this is to query Docker Hub via Cronjob. Here I provide a little bash script to check for Docker image updates on Docker Hub.
Here is a repository with this and some more scripts: https://gitlab.com/MatthiasLohr/omnibus-gitlab-management-scripts
If you have questions or problems, please create a ticket here.
2 COMMENTS
Thanks for this! It’s exactly what I needed to bring some more automation to my Docker setup at home. I wanted to share one small addition I made to support tags:
“`
TAG=latest
if [[ $IMAGE == *”:”* ]]; then
TAG=”${IMAGE##*:}”
IMAGE=”${IMAGE%:*}”
fi
“`
And then replace “latest” with “$TAG” in the rest of the script. Now you can pass in something like ‘jacobalberty/unifi:stable’ and it pulls the right tag. 🙂
Thank you very much! In the meanwhile, I created a repository with some of my tools for managing GitLab on DSM: https://gitlab.com/MatthiasLohr/omnibus-gitlab-management-scripts. If you want, feel free to create a Merge Request!
Anyways… should add this link to the post 😉
Comments are closed.