6.5. 使用 Anaconda 和 Kickstart 从网络部署容器镜像
您可以使用 Anaconda 和 Kickstart 部署 ISO 镜像来安装容器镜像。可安装的引导 ISO 已经包含配置的 ostreecontainer Kickstart 文件,您可用于置备自定义容器镜像。
先决条件
- 您已从红帽下载了用于您架构的 RHEL 10 Boot ISO。
流程
创建一个
ostreecontainerKickstart 文件,来从网络获取镜像。例如:# Basic setup text network --bootproto=dhcp --device=link --activate # Basic partitioning clearpart --all --initlabel --disklabel=gpt reqpart --add-boot part / --grow --fstype xfs # Reference the container image to install - The kickstart # has no %packages section. A container image is being installed. ostreecontainer --url quay.io/<namespace>/<image>:<tag> . bootc-image-builder:latest firewall --disabled services --enabled=sshd # Only inject a SSH key for root rootpw --iscrypted locked sshkey --username root "<your-key>" reboot使用 RHEL 10 Boot ISO 安装介质引导系统。
将具有以下内容的 Kickstart 文件附加到内核参数中:
inst.ks=http://<path_to_your_kickstart>
- 按 CTRL+X 引导系统。