Adding epel-release to a centos8/9 image

DistroBuilder is a great tool, am wondering if its possible to include the epel-release and use it.

I’ve been able to add the epel-release to the list of packages installed by the distromanager. But you need to do a yum update before you can install packages from the epel repospository.

Is there some way I can create a centos image which allows me to also install epel packages?

Maybe by running a post-unpack action? That should run before any of the package management stuff.

To allow installation of epel packages during the distrobuild, you can add the repository under packages.repositories (Package management - distrobuilder documentation). For example:

packages:
  manager: dnf
  update: true
  cleanup: true
  repositories:
    - name: epel
      url: |
        [epel]
        name=Extra Packages for Enterprise Linux 9 - $basearch
        metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-9&arch=$basearch&infra=$infra&content=$contentdir
        enabled=1