The issue occurs because the UBI8 container doesn't automatically use the same repositories as the host. To fix it, register the container with the Red Hat Subscription Manager using subscription-manager register --username=<your_username> --password=<your_password> and attach the subscription with subscription-manager attach. Then, enable the required repositories with subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms --enable rhel-8-for-$(arch)-baseos-rpms --enable rhel-8-for-$(arch)-appstream-rpms. Finally, install EPEL inside the container using yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm.