Stackable

Stackable

Stumbling Over ‘ubi-8-appstream’ In ‘ubi8/ubi-minimal’

Today our Docker image builds started crashing out of the blue. The following error message showed up:

error: repo ubi-8-appstream not found

The offending line, was calling microdnf with --enablerepo=ubi-8-appstream. Suddenly, images which were building just fine in the morning, stopped doing so.

This might be a very weird, temporary issue. But just in case it persists, here are the quick fixes we found.

Update: communication with RedHat Support concluded that this was an intentional change. There were issues with how yum and dnf expected repo IDs to look like, which would be fixed by the change. The docs have been updated to mention the new names.

Going Back to a Previous Base Image Version

As the issue started showing up together with a recently pushed registry.access.redhat.com/ubi8/ubi-minimal image, the first attempt to fix it was to go back to a previous version.

And indeed, specifying a less recent tag removed the error message:

FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6-902

Changing the Repository Naming

It seems like changing the name of the enabled repository from ubi-8-appstream to ubi-8-appstream-rpms fixes the issue in the more recent image as well.

Note: credit goes to Teo, who found it in /etc/yum.repos.d/*.repo, which is where yum/dnf/microdnf store all of their repositories. It doesn’t show up in most places.

Update: the above article was brought up to date by now, and mentions the new names.

Digging Deeper

Although these fixes seem to work, we are going to look into the issue and its origins in the near future. Was it a faulty release of the ubi-minimal image? Did we miss a deprecation warning? Was something assumed which doesn’t hold up?

Update: communication with RedHat Support concluded that this was an intentional change. There were issues with how yum and dnf expected repo IDs to look like, which would be fixed by the change. The docs have been updated to mention the new names. Unfortunately, we haven’t received suggestions on how to avoid such surprises in the future.

I hope this small writeup will save you some time and help to get your appstream-using Docker image working again!

Note: you can follow our side of the issue over here.

Comments are closed.