Inspecting containers is an important part of working with containers as it allows to understand a little more about how a container was built, it's capabilities and much more.
For example, for the 'rhel8/mariadb-103' we can see the:
After you pull an image to your local system and before you run it, it is a good idea to investigate that image.
The podman inspect command displays basic information about what an image does.
Using the podman command, mount an active container to further investigate its contents.
# podman mount wonderful_jackson
/var/lib/containers/storage/overlay/bf3ba72175111741a16fa2db7b27e2f7fbd86965cf7931568bd5b6e22e002b05/merged
Use the rpm command to examine the packages installed on the container’s mount point
# podman mount wonderful_jackson
/var/lib/containers/storage/overlay/bf3ba72175111741a16fa2db7b27e2f7fbd86965cf7931568bd5b6e22e002b05/merged
# rpm -qa \
--root=/var/lib/containers/storage/overlay/bf3ba72175111741a16fa2db7b27e2f7fbd86965cf7931568bd5b6e22e002b05/merged
⚠️ WARNING: You will need to install 'skopeo'
📌 EXAM TIP: If you can't remember what to install, remember that you need a container inspector, so 'dnf search container | grep -i inspect' will give you the package name (it's easy if you are familiar with Linux).
To inspect a container image before you pull it to your system, you can use the 'skopeo inspect' command. With 'skopeo inspect', you can display information about an image that resides in a remote container registry.
The command format is very similar to 'podman inspect', however you will need to provide the registry name:
# skopeo inspect docker://docker.io/sameersbn/squid