In this article, we will have explained the necessary steps to install Podman on Rocky Linux 8. Before continuing with this tutorial, make sure you are logged in as a user with sudo
privileges. All the commands in this tutorial should be run as a non-root user.
Podman is a free and open-source container platform built to develop, manage and deploy containers and pods on a Linux environment. Podman is designed according to OCI (Open Container Initiative) standards that allow Podman to interact directly with the kernel, containers, and images. Podman manages the entire container ecosystem including pods, container images, container volumes using the libpod library. Libpod is a library used to create container pods.
Install Podman on Rocky Linux 8
Step 1. First, before you start installing any package on your Rocky Linux server, we always recommend making sure that all system packages are updated.
sudo dnf install epel-release sudo dnf update sudo dnf upgrade sudo dnf module install container-tools
Step 2. Install Podman on Rocky Linux.
To Install Podman on Rocky Linux system by using the following command below:
sudo dnf install podman
Confirm Podman have been installed:
$ podman -v podman version 3.3.2
Step 3. Searching Podman for Container Images.
Run the syntax below:
podman search <search-term>
For example to search for the image of the Nginx web server using the following command:
podman search nginx
Next, download the image, use one of the following commands:
podman pull nginx
After that, running a Podman container:
podman run -d --name webserver nginx
Now check listing containers and their statuses:
podman ps
Output:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 19bbmwe46bc627 docker.io/library/nginx:latest nginx -g daemon o... 28 seconds ago Up 36 seconds ago webserver 35abmwe46a5a55 docker.io/library/nginx:latest nginx -g daemon o... 4 seconds ago Up 8 seconds ago webserver2
Step 4. Using Podman Commands.
The below table shows the most commonly used commands in Podman:
Command | Description |
---|---|
podman –help | Retrieve Podman help information. |
man podman | Retrieve detailed Podman information. |
podman search some image | Find images (as with most Unix programs). Input the image name. |
podman pull someregistry.org/someimage | Download an image. Input the name of the registry and image. |
podman someimages | See podman search some image. Use the full name of an image (e.g., someregistry.org/someimages/version1.0.1) as they are stored in a different registry. |
podman run -dt -p 8080: 80 / tcp someregistry.org/someimages | Start the container. |
podman ps | View the list of running containers. |
podman ps -aB | View the list of all containers (created, completed, and launched). |
podman inspect -l | grep ipaddress | View the running container. A container can work in non-root mode, so it is not assigned an IP address. |
podman logs -l | View container logs. |
podman top -l | View pid containers. |
podman stop -l | Stop a container. |
podman rm -l | Remove a container. |
That’s all you need to do to install Podman on Rocky Linux 8. I hope you find this quick tip helpful. For further reading on Podman, please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.