Mismatch between host (RHEL8) and container (UBI8) subscriptions
According to RHEL documentation and basically any tutorial on the Internet, my podman containers should take advantage of it's host's subscriptions.
But in my case it does not...
On my host, I have :
# yum repolist enabled
Updating Subscription Management repositories.
repo id repo name
dirsrv-11-for-rhel-8-x86_64-rpms Red Hat Directory Server 11 for RHEL 8 x86_64 (RPMs) <= I enabled this repo on the host, thanks to my subscription
rhel-8-for-x86_64-appstream-rpms Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
rhel-8-for-x86_64-baseos-rpms Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
But, inside a podman container :
# yum repolist enabled
Updating Subscription Management repositories.
Unable to read consumer identity <= this does not look good....
Subscription Manager is operating in container mode.
repo id repo name
ubi-8-appstream Red Hat Universal Base Image 8 (RPMs) - AppStream
ubi-8-baseos Red Hat Universal Base Image 8 (RPMs) - BaseOS
ubi-8-codeready-builder Red Hat Universal Base Image 8 (RPMs) - CodeReady Builder
<= My repo is missing !
In the container, I do have access to the required files :
# ls -la /run/secrets/
total 260
drwxr-xr-x. 4 root root 120 Aug 29 16:19 .
drwxr-xr-x. 1 root root 4096 Aug 29 16:22 ..
drwxr-xr-x. 2 root root 72 Aug 23 13:08 etc-pki-entitlement
-rw-r--r--. 1 root root 257134 Aug 26 12:40 redhat.repo
drwxr-xr-x. 6 root root 104 Aug 23 09:00 rhsm
-rw-r--r--. 1 root root 0 Aug 29 16:19 system-fips
Any idea what is going on here ?
Thanks for your help !
G.B.
Edit : some information about my system :
# cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.6 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.6"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.6 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/red_hat_enterprise_linux/8/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.6
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.6"
# podman -v
podman version 4.1.1
# buildah -v
buildah version 1.26.2 (image-spec 1.0.2-dev, runtime-spec 1.0.2-dev)
# yum --version
4.4.2
Installed: rpm-0:4.14.3-23.el8.x86_64 at Thu Aug 25 09:26:36 2022
Built : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at Tue Apr 5 18:38:09 2022