Docker Community Forums

Share and learn in the Docker community.

How to reduce maintenance for dockerhub official images?


I’ve added an official dockerhub image for xwiki at This is all working nicely and the official image is available at

However I have a maintenance problem. At the moment we have 3 branches (master, 8.x and 9.x) but I’m planning to add a lot more for “lts”, “stable”, “alpine” + tags for fixed versions of XWiki. In total it’s likely there’ll be something like 20 branches/tags at least.

The issue is that when I fix a bug in a Dockerfile for a branch or simply when I bring an improvement or improve the documentation, I need to backport it to all other branches and even delete and recreate the tags. That’s hugely time consuming and error-prone (it’s easy to forget one branch/tag).

So I’m wondering how other official library maintainers handle this.

Any idea?

Thanks a lot
XWiki official image maintainer

One idea is to:

  • Have template files (Dockerfile.template, docker-compose.yml.template, etc)
  • Have a build that generates the variants in subdirectories on master.
  • Manually execute that build regularl (or through a CI) and commit the result
  • Also generate the docker-library file that contains the SHA1 and send a PR when it changes

Any other idea? Is that how people do it?