根据拉赫尔文件和互联网上的任何教程,我的podman容器应该利用它的主机订阅。
但在我的情况下它不..。
在我的主人,我有:
# 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)但是,在一个船舱里:
# 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 !在容器中,我确实可以访问所需的文件:
# 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知道这是怎么回事吗?
谢谢你的帮助!
G.B.
编辑:有关我的系统的一些信息:
# 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发布于 2023-01-27 15:29:43
不知道你是否还需要帮助,但我刚刚遇到了一个类似的问题。在我的例子中,我在VirtualBox中使用了RHEL8.7VM。我也遇到了同样的问题。对我来说,这是因为我在我的主机Windows机器上安装了码头。它有一些明显与VirtualBox混在一起的虚拟化特性。为了解决这个问题,我导航到Apps & features >>打开或关闭Windows功能。禁用和Hypervisor或虚拟机功能,您可以看到(特别是对我来说,它是虚拟机平台)。在此之后,我重新启动了我的系统,并再次启动了VM,一切都正常。我仍然收到了错误消息,但是我的脚本现在可以运行,并且可以访问我需要的所有存储库。请注意,这样做会破坏您的主机上的Docker。您将不得不卸载和重新安装来修复它。我希望这能帮到你。
https://unix.stackexchange.com/questions/715367
复制相似问题