6.5. 使用 Anaconda 和 Kickstart 从网络部署容器镜像


您可以使用 Anaconda 和 Kickstart 安装容器镜像来部署 ISO 镜像。可安装的引导 ISO 已经包含配置的 ostreecontainer Kickstart 文件,您可用于置备自定义容器镜像。

先决条件

  • 您已从红帽下载了适用于您的架构的 RHEL 10 引导 ISO。

流程

  1. 创建一个 ostreecontainer Kickstart 文件,从网络获取镜像。例如:

    # 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
    Copy to Clipboard Toggle word wrap
  2. 使用 RHEL 10 引导 ISO 安装介质引导系统。

    1. 将具有以下内容的 Kickstart 文件附加到内核参数中:

      inst.ks=http://<path_to_your_kickstart>
      Copy to Clipboard Toggle word wrap
  3. CTRL+X 引导系统。
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat