Saturday, December 28, 2024
Google search engine
HomeGuest BlogsInstall and Use Podman on CentOS 8 / RHEL 8

Install and Use Podman on CentOS 8 / RHEL 8

How can I install Podman on CentOS 8 / RHEL 8 Linux machine?. RHEL 8 / CentOS 8 has dropped official support for Docker as container runtime. Instead, Red Hat has been working on libpod (Podman’s container management library) which provides a library for applications to use the Container Pod concept available in the world of Kubernetes. One of the tools provided as part of libpod project is podman – Used for managing Pods, Containers, and Container Images.

Podman can be defined as a tool designed for managing containers and pods without requiring a container daemon. All the containers and Pods are created as child processes of the Podman tool. The Podman’s CLI is based on the Docker CLI.

It is easy to install Podman on CentOS 8 or RHEL 8 Linux machine. Most container related tools on CentOS 8 are available on the module called container-tools.

For installation on other systems, please check below guides:

Follow below guides to install Podman on CentOS 8 / RHEL 8.

Step 1: Enable EPEL repository

Ensure EPEL repository as some Python packages required are available in EPEL/PowerTools repository.

Ensure PowerTools repo is enabled as well – CentOS 8 only

sudo dnf config-manager --set-enabled powertools

Step 2: Install Podman on CentOS 8 / RHEL 8

First update your system:

sudo dnf -y update

The fire the commands below to install Podman on CentOS 8 / RHEL 8 Linux machine.

$ sudo dnf module list | grep container-tools
container-tools      rhel8 [d][e]     common [d]                               Most recent (rolling) versions of podman, buildah, skopeo, runc, conmon, runc, conmon, CRIU, Udica, etc as well as dependencies such as container-selinux built and tested together, and updated as frequently as every 12 weeks.

$ sudo dnf install -y @container-tools          

If the installation was successful, you should be able to check the podman version.

$ podman version
podman version 4.5.1

To check the help page, run the command:

$ podman --help

Step 3: Using Podman on CentOS 8 / RHEL 8

Now that Podman has been installed in our Linux machine, it’s time to start playing with it. First, check if you can run a basic container.

$ podman run -it --rm alpine sh
/ # cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.18.3
PRETTY_NAME="Alpine Linux v3.18"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"

/ # exit

Manage Container images

To download, list and delete images, use the commands:

# Pull image
$ podman pull ubuntu
$ podman pull centos

# List existing images
$ podman images
REPOSITORY                 TAG      IMAGE ID       CREATED       SIZE
docker.io/library/ubuntu   latest   775349758637   3 weeks ago   66.6 MB
docker.io/library/alpine   latest   965ea09ff2eb   5 weeks ago   5.82 MB
docker.io/library/centos   latest   0f3e07c0138f   7 weeks ago   227 MB

# Delete images
$ podman rmi <imageid>
$ podman rmi 775349758637
775349758637aff77bf85e2ff0597e86e3e859183ef0baba8b3e8fc8d3cba51c

So as not to repeat our work, I recommend you check our complete guide on how to work with podman.

Related guides

RELATED ARTICLES

Most Popular

Recent Comments