This guide will discuss how to install Podman on CentOS 7 / Fedora 31/30/29. Podman is a daemonless container engine for developing, managing, and running OCI Containers on your Linux System. The major difference between Docker and Podman is that there is no daemon in Podman.

For Ubuntu, check: How to install podman on Ubuntu

Podman uses container runtimes as well for example runc but the launched containers are direct descendants of the podman process. This kind of architecture has its advantages such as the following:

  • Applied Cgroups or security constraints still control the container: Whatever cgroup constraints you apply on the podman command, the containers launched will receive those same constraints directly.
  • Advanced features of systemd can be utilized using this model: This can be done by placing podman into a systemd unit file and hence achieving more.

The following set of tools work together to power the use of Containers without an all-time running daemon process.

  • Buildah to facilitate the building of OCI images
  • Skopeo for sharing/finding container images on Docker registries, the Atomic registry, private registries, local directories, and local OCI-layout directories.
  • Podman for running containers without the need for a daemon.

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

The podman package is available on Fedora & CentOS upstream repositories.

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

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

To view installed package details, use 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 the installation, you can display information pertaining to the host, current storage stats, and build of 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 pull 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 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 & Fedora system, the next reading is on how to use it. We have a guide for this:

How To run Docker Containers using Podman and Libpod

Conclusion

Podman shows a lot of promise in the future of Containerization. In fact, Red Hat did not just remove the Docker container engine from OpenShift. It also removed the Docker container engine, along with the docker command, from Red Hat Enterprise Linux 8 entirely. Thank you for reading through.

Also check:

How to Setup Docker Private Registry on Fedora / CentOS

Best Storage Solutions for Kubernetes & Docker Containers

How to Install Docker on CentOS / Fedora

How to run Local Openshift Cluster with Minishift

Deploy Lightweight Kubernetes with MicroK8s and Snap