Este contenido no está disponible en el idioma seleccionado.
Chapter 4. Using the command-line assistant component functions in Image Mode for RHEL
You can use the command-line assistant component functions in Image Mode for RHEL during container builds and at runtime. The assistant performs system tasks while maintaining read-only file system security on x86_64 and aarch64 architectures.
Prerequisites
-
The
container-toolsmeta-package is installed. - You have a subscribed RHEL system. For more information, see the Getting Started with RHEL System Registration documentation.
Procedure
Create a
Containerfile:$ cat Containerfile FROM registry.redhat.io/rhel10/rhel-bootc:latest RUN <<EORUN set -euxo pipefail dnf install -y command-line-assistant dnf clean all rm -rf /var/cache/dnf/ bootc container lint EORUNBuild the
<image>image by usingContainerfilein the current directory:$ podman build -t quay.io/<namespace>/<image>:<tag> .Build a disk image from the container image. The following example creates a QCOW2 image:
$ sudo podman run \ --rm \ -it \ --privileged \ --pull=newer \ --security-opt label=type:unconfined_t \ -v ./config.toml:/config.toml:ro \ -v ./output:/output \ -v /var/lib/containers/storage:/var/lib/containers/storage \ registry.redhat.io/rhel10/bootc-image-builder:latest \ --type qcow2 \ --config /config.toml \ quay.io/<namespace>/<image>:<tag>-
<namespace>: your container registry namespace. -
<image>: your image name. -
<tag>: your image tag, for example, latest.
-
- Boot a machine with the QCOW2 disk image. For instructions, see Deploying a container image by using KVM with a QCOW2 disk image.
Verification
Verify that the installation works by running the command-line assistant. For example:
$ c "How to deploy a QCOW2 disk image?"The output looks similar to the following example:
+*+ Asking RHEL Lightspeed To deploy a QCOW2 disk image....