How to install Podman on CentOS 7 and Fedora 31/30/29

This guide will discuss how to install Podman on CentOS 7 / Fedora 31/30/29. Podman is a daemonless container engine for development, management, and operation OCI Containers on Linux systems. The main difference between Docker and Podman is that there are no daemons in Podman.

For Ubuntu, please check: How to install podman on Ubuntu

Podman also uses container runtimes, such as runc, but the started container is a direct descendant of the podman process. This architecture has the following advantages:

  • The applied Cgroup or security constraint still controls the container: no matter what cgroup constraint you apply to the podman command, the started container will receive the same constraint directly.
  • Using this model, you can take advantage of the advanced features of systemd: this can be done by putting podman into a systemd unit file and thus implementing more features.

The following toolsets can work together to support the use of Containers without the need for a running daemon.

  • Buildah Facilitate the construction of OCI images
  • Skopeo Used to share / find container images on Docker registry, Atomic registry, private registry, local directory and local OCI layout directory.
  • Podman does not require a daemon to run containers.

Install Podman on CentOS 7 / Fedora 31/30/29

The podman package is available in Fedora and CentOS upstream repositories.

--------- CentOS --------------
$ sudo yum -y install podman

---------- Fedora --------------
$ sudo dnf install -y podman

To view the details of the installed packages, use the rpm command.

$ rpm -qi podman
 Name        : podman
 Version     : 0.12.1.2
 Release     : 2.git9551f6b.el7.centos
 Architecture: x86_64
 Install Date: Sat 15 Jun 2019 01:43:33 PM EAT
 Group       : Unspecified
 Size        : 33654116
 License     : ASL 2.0
 Signature   : RSA/SHA256, Wed 13 Feb 2019 11:56:49 PM EAT, Key ID 24c6a8a7f4a80eb5
 Source RPM  : podman-0.12.1.2-2.git9551f6b.el7.centos.src.rpm
 Build Date  : Wed 13 Feb 2019 08:05:29 PM EAT
 Build Host  : x86-02.bsys.centos.org
 Relocations : (not relocatable)
 Packager    : CentOS BuildSystem http://bugs.centos.org
 Vendor      : CentOS
 URL         : https://github.com/containers/libpod
 Summary     : Manage Pods, Containers and Container Images
 Description :
 Manage Pods, Containers and Container Images
 libpod provides a library for applications looking to use
 the Container Pod concept popularized by Kubernetes.

After installation, you can display information about the host, the current storage status, and the build of the podman.

$ podman info
host:
  BuildahVersion: 1.6-dev
  Conmon:
    package: podman-0.12.1.2-2.git9551f6b.el7.centos.x86_64
    path: /usr/libexec/podman/conmon
    version: 'conmon version 1.12.0-dev, commit: b909c9e1a3e8f14d5694a118fb9c0c0325a31d4f-dirty'
  Distribution:
    distribution: '"centos"'
    version: "7"
  MemFree: 461684736
  MemTotal: 3872858112
  OCIRuntime:
    package: runc-1.0.0-59.dev.git2abd837.el7.centos.x86_64
    path: /usr/bin/runc
    version: 'runc version spec: 1.0.0'
  SwapFree: 0
  SwapTotal: 0
  arch: amd64
  cpus: 2
  hostname: techwiz-app-server
  kernel: 3.10.0-957.10.1.el7.x86_64
  os: linux
  rootless: false
  uptime: 831h 27m 5.82s (Approximately 34.62 days)
insecure registries:
  registries: []
registries:
  registries:
  - registry.access.redhat.com
  - docker.io
  - registry.fedoraproject.org
  - quay.io
  - registry.centos.org
store:
  ContainerStore:
    number: 0
  GraphDriverName: overlay
  GraphOptions:
  - overlay.override_kernel_check=true
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
  ImageStore:
    number: 0
  RunRoot: /var/run/containers/storage

Try pulling the Alpine Linux image.

$ podman pull alpine
Trying to pull registry.access.redhat.com/alpine:latest...Failed
Trying to pull docker.io/alpine:latest...Getting image source signatures
Copying blob sha256:e7c96db7181be991f19a9fb6975cdbbd73c65f4a2681348e63a141a2192a5f10
 2.63 MB / 2.63 MB [========================================================] 0s
Copying config sha256:055936d3920576da37aa9bc460d70c5f212028bda1c08c0879aedf03d7a66ea1
 1.48 KB / 1.48 KB [========================================================] 0s
Writing manifest to image destination
Storing signatures
055936d3920576da37aa9bc460d70c5f212028bda1c08c0879aedf03d7a66ea1

Check the list of downloaded images.

$ podman images
REPOSITORY                 TAG      IMAGE ID       CREATED       SIZE
docker.io/library/alpine   latest   055936d39205   5 weeks ago   5.8 MB

Using Podman on CentOS 7 / Fedora 31/30/29

Now that you have installed podman on CentOS 7 and Fedora systems, the next section is how to use it. We have a guide on this:

How to run Docker containers with Podman and Libpod

Setting up Docker container registry and encrypting SSL with Podman

in conclusion

Podman shows much hope for the future of containerization. In fact, Red Hat has not only removed the Docker container engine from OpenShift. It also removed the Docker container engine as well docker The command is completely from Red Hat Enterprise Linux 8. Thank you for reading through.

Also check:

How to set up Docker private registry on Fedora / CentOS

Best storage solution for Kubernetes and Docker containers

How to install Docker on CentOS / Fedora

How to run a local Openshift cluster using Minishift

Deploy lightweight Kubernetes with MicroK8 and Snap

Sidebar