第 5 章 Supported image customizations
You can customize your image by adding customizations to your blueprint, such as adding an additional RPM package, enabling a service, or customizing a kernel command line parameter.
You can use several image customizations within blueprints. By using the customizations, you can add packages and groups to the image that are not available in the default packages. To use these options, configure the customizations in the blueprint and import (push) it to the RHEL image builder.
5.1. Selecting a distribution 复制链接链接已复制到粘贴板!
You can use the distro field to specify the distribution to use when composing your images or solving dependencies in the blueprint.
If the distro field is left blank, the blueprint automatically uses the host’s operating system distribution. If you do not specify a distribution, the blueprint uses the host distribution. When you upgrade the host operating system, blueprints without a specified distribution build images by using the upgraded operating system version.
You can build images for older major versions on a newer system. For example, you can use a RHEL 10 host to create RHEL 9 and RHEL 8 images. However, you cannot build images for newer major versions on an older system.
You cannot build an operating system image that differs from the RHEL image builder host. For example, you cannot use a RHEL system to build Fedora or CentOS images.
Prerequisites
- You have created a blueprint.
Procedure
Customize the blueprint with the RHEL distribution to always build the specified RHEL image:
name = "blueprint_name" description = "blueprint_version" version = "0.1" distro = "different_minor_version"For example:
name = "tmux" description = "tmux image with openssh" version = "1.2.16" distro = "rhel-9.6"Replace
"different_minor_version"to build a different minor version, for example, if you want to build a RHEL 9.6 image, usedistro = "rhel-96". On RHEL 9.5 image, you can build minor versions such as RHEL 9.4, RHEL 9.3, and earlier releases.