Chapter 4. Composing a RHEL for Edge image using Image Builder command-line
Use Image Builder to create a custom RHEL for Edge image (OSTree commit).
To access Image Builder and to create your custom RHEL for Edge image, you can either use the RHEL web console interface or the command-line interface.
This chapter provides information about creating RHEL for Edge images using the CLI. To create RHEL for Edge images using RHEL web console, see, Chapter 3, Composing a RHEL for Edge image using Image Builder in RHEL web console.
The workflow to compose RHEL for Edge images using the CLI, involves the following high-level steps:
- Create a blueprint for RHEL for Edge image
- Create a RHEL for Edge image
- Download the RHEL for Edge image
To perform the steps, use the
To run the composer-cli commands as non-root, you must be part of the weldr group or you must have administrator access to the system.
4.1. Creating a RHEL for Edge image blueprint using Image Builder command-line interface
To create a blueprint for RHEL for Edge image, perform the following steps:
Create a plain text file in the Tom’s Obvious, Minimal Language (TOML) format, with the following content:
name = "blueprint-name" description = "blueprint-text-description" version = "0.0.1" modules = [ ] groups = [ ]
- blueprint-name is the name and blueprint-text-description is the description for your blueprint.
- 0.0.1 is the version number according to the Semantic Versioning scheme.
- Modules describe the package name and matching version glob to be installed into the image, for example, the package name = "tmux" and the matching version glob is version = "2.9a".
Groups are packages groups to be installed into the image, for example the group package anaconda-tools.
At this time, if you do not know the modules and groups, leave them empty.
Include the required packages and customize the other details in the blueprint to suit your requirements.
For more information about the packages that you can include and customize in a blueprint, see Supported Image Customizations.
For every package that you want to include in the blueprint, add the following lines to the file:
[[packages]] name = "package-name" version = "package-version"
- package-name is the name of the package, such as httpd, gdb-doc, or coreutils.
package-version is the version number of the package that you want to use.
The package-version supports the following dnf version specifications:
- For a specific version, use the exact version number such as 8.3.0.
- For the latest available version, use the asterisk *.
- For the latest minor version, use formats such as 8.*.
Push (import) the blueprint to the Image Builder server:
# composer-cli blueprints push blueprint-name.toml
List the existing blueprints to check whether the created blueprint is successfully pushed and exists.
# composer-cli blueprints list
Check whether the components and versions listed in the blueprint and their dependencies are valid:
# composer-cli blueprints depsolve blueprint-name
4.2. Creating a RHEL for Edge image using Image Builder command-line interface
To create a RHEL for Edge image using Image Builder command line interface, ensure that you have met the following prerequisites and then follow the procedure.
- You have created a blueprint for RHEL for Edge image.
Begin to create the RHEL for Edge image.
# composer-cli compose start blueprint-name image-type
Where, blueprint-name is the RHEL for Edge blueprint name. image-type is
A confirmation that the composer process has been added to the queue appears. It also shows a Universally Unique Identifier (UUID) number for the image created. Use the UUID number to track your build. Also keep the UUID number handy for further tasks.
For more information about supported image types, refer to the Creating a system image with Image Builder in the command-line interface .
Check the image compose status.
# composer-cli compose status
The output displays the status in the following format:
<UUID> RUNNING date blueprint-name _image-typeNote
The image creation process takes a few minutes to complete.
To interrupt the image creation process, run:
# composer-cli compose cancel <UUID>
4.3. Downloading a RHEL for Edge image using the Image Builder command-line interface
To download a RHEL for Edge image using Image Builder command line interface, ensure that you have met the following prerequisites and then follow the procedure.
- You have created a RHEL for Edge image.
Review the RHEL for Edge image status.
# composer-cli compose status
The output must display the following:
$ <UUID> FINISHED date blueprint-name image-type
Download the image.
# composer-cli compose image <UUID>
Image Builder downloads the image as a tar file at
The UUID number and the image size is displayed alongside.
$ <UUID>-commit.tar: size MB
The image contains a commit and a
json file that contains information metadata about the repository content.