5.2. Running commands in a container from the host
Use the podman run command to display the type of operating system of the container.
Prerequisites
-
The
container-toolsmeta-package is installed.
Procedure
Display the type of operating system of the container based on the
registry.access.redhat.com/ubi10/ubicontainer image using thecat /etc/os-releasecommand:$ podman run --rm registry.access.redhat.com/ubi10/ubi cat /etc/os-release NAME="Red Hat Enterprise Linux" ... ID="rhel" ... HOME_URL="https://www.redhat.com/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT=" Red Hat Enterprise Linux 10" ...Optional: List all containers.
$ podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESBecause of the
--rmoption you should not see any container. The container was removed.