10.18. 容器
Podman 和 bootc 没有共享同样的注册中心登录过程
在拉取镜像时,Podman 和 bootc
使用不同的注册中心登录过程。因此,如果您使用 Podman 登录到镜像,登录到 bootc
的注册中心将不适用于该镜像。当您为 RHEL 系统安装镜像模式时,使用以下命令登录到 registry.redhat.io:
podman login registry.redhat.io <username_password>
# podman login registry.redhat.io <username_password>
然后,您可以使用以下命令尝试切换到 registry.redhat.io/rhel9/rhel-bootc
镜像:
bootc switch registry.redhat.io/rhel9/rhel-bootc:9.4
# bootc switch registry.redhat.io/rhel9/rhel-bootc:9.4
您应该可以看到以下消息:
Queued for next boot: registry.redhat.io/rhel9/rhel-bootc:9.4
Queued for next boot: registry.redhat.io/rhel9/rhel-bootc:9.4
但是显示了一个错误:
ERROR Switching: Pulling: Creating importer: Failed to invoke skopeo proxy method OpenImage: remote error: unable to retrieve auth token: invalid username/password: unauthorized: Please login to the Red Hat Registry using your Customer Portal credentials. Further instructions can be found here: https://access.redhat.com/RegistryAuthentication
ERROR Switching: Pulling: Creating importer: Failed to invoke skopeo proxy method OpenImage: remote error: unable to retrieve auth token: invalid username/password: unauthorized: Please login to the Red Hat Registry using your Customer Portal credentials. Further instructions can be found here: https://access.redhat.com/RegistryAuthentication
临时解决方案:按照步骤 配置容器拉取 secret,以使用带有 bootc
的经过验证的注册中心。
Jira:RHELDOCS-18471[1]
启用 composefs 后,cloud-init
growpart 跳过
启用 composefs 时,如果您从通用基础镜像生成一个镜像,则 rootfs 将不会增大文件系统,提示一个类似如下的错误:
2024-04-30 17:27:53,543 - cc_growpart.py[DEBUG]: '/' SKIPPED: stat of 'overlay' failed: [Errno 2] No such file or directory: 'overlay'
2024-04-30 17:27:53,543 - cc_growpart.py[DEBUG]: '/' SKIPPED: stat of 'overlay' failed: [Errno 2] No such file or directory: 'overlay'
临时解决方案:您可以通过在容器中指定 rootfs
默认大小,而不是在实例创建时动态选择 100G 来添加自定义的 growpart,以便能够在容器中写一个分区配置。
FIPS bootc 镜像创建在启用了 FIPS 的主机上失败
由于 update-crypto-policies 软件包,使用启用了 FIPS 模式的 Podman 构建磁盘镜像失败,退出码为 3 :
Enable the FIPS crypto policy crypto-policies-scripts is not installed by default in RHEL-10
# Enable the FIPS crypto policy
# crypto-policies-scripts is not installed by default in RHEL-10
RUN dnf install -y crypto-policies-scripts && update-crypto-policies --no-reload --set FIPS
临时解决方案:构建具有禁用了 FIPS 模式的 bootc 镜像。
磁盘空间不足可能导致部署失败
在没有足够可用磁盘空间的软件包模式系统上部署 bootc 容器镜像可能会导致安装错误,并阻止系统引导。确保有足够的磁盘空间供镜像安装,并在部署前调整配置的逻辑卷。
Jira:RHELDOCS-19948[1]
Azure 上标记为 LVM 的 RHEL 镜像需要调整默认布局
当在 Azure 上使用 system-reinstall-bootc
或 bootc install
时,标记为 LVM 的 RHEL 镜像需要调整默认布局。
临时解决方案:使用标记为 RAW 的 RHEL 镜像。这不需要调整默认布局。
Jira:RHELDOCS-19945[1]