Running a container using Podman and UBI
Now that you have the container tools from the Application Stream repository installed, let’s run a simple container based on Red Hat UBI that contains a set of official container images and extra software based on RHEL. To run a UBI image, it only takes a single command, as illustrated in the following code snippet:
[root@rhel-instance ~]# podman run –it registry.access.redhat.com/ubi9/ubi bash Trying to pull registry.access.redhat.com/ubi9:latest... Getting image source signatures Checking if image destination supports signatures Copying blob bf30f05a2532 done Copying blob c6e5292cfd5f done Copying config 168c58a383 done Writing manifest to image destination Storing signatures [root@e38453f5e055 /]#
Check the hostname; it has changed from rhel-instance
to e38453f5e055
, which means we are inside the container.
Tip
These tutorials run commands as root, but one of the benefits of Podman is that it can run containers...