6.7. 使用 bootc 部署一个容器镜像
有了 bootc
,您就有了一个容器,它是真相的来源。它包含一个基本的构建安装程序,它作为 bootc install to-disk
或 bootc install to-filesystem
提供。通过使用 bootc
安装方法,您不需要执行任何其他步骤来部署容器镜像,因为容器镜像包含一个基本的安装程序。
使用 RHEL 的镜像模式,您可以安装未配置的镜像,例如,没有默认密码或 SSH 密钥的镜像。
使用 RHEL ISO 镜像对设备执行裸机安装。
先决条件
- 您已从红帽下载了用于您架构的 9.4 Boot ISO。请参阅 下载 RH 引导镜像。
- 您已创建了一个配置文件。
流程
将配置注入正在运行的 ISO 镜像,例如:
podman run --rm --privileged --pid=host -v /var/lib/containers:/var/lib/containers --security-opt label=type:unconfined_t <image> bootc install to-disk <path-to-disk>
$ podman run --rm --privileged --pid=host -v /var/lib/containers:/var/lib/containers --security-opt label=type:unconfined_t <image> bootc install to-disk <path-to-disk>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow