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:
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 sudo systemctl reboot
The fire the commands below to install Podman on CentOS 8 / RHEL 8 Linux machine.
$ sudo dnf module list | grep container-tools container-tools 1.0 common [d] Common tools and dependencies for container runtimes container-tools rhel8 [d] common [d] Common tools and dependencies for container runtimes $ sudo dnf install -y @container-tools
If the installation was successful, you should be able to check the podman version.
$ podman version Version: 1.4.2-stable2 RemoteAPI Version: 1 Go Version: go1.12.8 OS/Arch: linux/amd64
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.10.3 PRETTY_NAME="Alpine Linux v3.10" HOME_URL="https://alpinelinux.org/" BUG_REPORT_URL="https://bugs.alpinelinux.org/" / # 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.