7.6. Adding software to a UBI container on a unsubscribed host
You do not have to disable any repositories when adding software packages on unsubscribed RHEL systems.
Prerequisites
-
The
container-toolsmeta-package is installed.
Procedure
Add a package to a running container based on the UBI standard or UBI init images. Do not disable any repositories. Use the
podman runcommand to run the container. then use thednf installcommand inside a container.For example, to add the
bzip2package to the UBI standard based container:$ podman run -it --name myubi registry.access.redhat.com/ubi10/ubi # dnf install bzip2For example, to add the
bzip2package to the UBI init based container:$ podman run -it --name myubimin registry.access.redhat.com/ubi10/ubi-minimal # microdnf install bzip2
Verification
List all enabled repositories:
To list all enabled repositories inside the containers based on UBI standard or UBI init images:
# dnf repolistTo list all enabled repositories inside the containers based on UBI minimal containers:
# microdnf repolist
- Ensure that the required repositories are listed.
List all installed packages:
# rpm -qa- Ensure that the required packages are listed.