2 minutes
RSS/Atom feed of docker image pushes to DockerHub
Some of my CI/CD deployments need to be triggered when a new docker image is pushed with a specific tag for a specific architecture, to stay up to date.
A lot of these image updates can be dealt with dependabot/renovate, creating a PR with the new release, or with tools like watchtower.
In more “complex” cases however, I need my Jenkins instance to be aware of the new image being pushed to perform actions before and after pulling the image and recreating the container.
I built DockerRSS (now rss-banquet) for this, polling the Dockerhub API and formatting the image pushes data into an RSS feed. Its best use for me is in generating a feed for a specific tag (typically latest
) and filtering for a specific platform (linux/arm64
in my case), to only get the image pushes I am interested in.
Using the UrlTrigger Jenkins plugin, my pipelines get triggered by new pushes to DockerHub:
pipeline {
agent any
[...]
triggers {
URLTrigger(
triggerLabel: 'my-agent',
labelRestriction: true,
cronTabSpec: 'H/15 * * * *',
entries: [
URLTriggerEntry(
url: 'https://banquet/dockerhub/nbr23/rss-banquet:server-latest?platform=linux/arm64',
requestHeaders: [
RequestHeader( headerName: "Accept" , headerValue: "application/atom+xml" )
],
contentTypes: [
XMLContent(
[
XMLContentEntry( xPath: 'feed/entry[1]/id' )
])
]
)
]
)
}
[...]
}
I also enjoy having the feed of DockerHub image pushes in the ‘Releases’ section of my RSS Reader, at least for now. This allows me to keep track of interesting images or images that I maintain.
2024-02-01 Update:
I have consolidated dockerRSS and other RSS/Atom feed tools into rss-banquet, and archived dockerRSS.