Install Podman on CentOS 7 & Fedora 34/33/32/31/30
source link: https://computingforgeeks.com/how-to-install-podman-on-centos-fedora/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
This guide will discuss how to install Podman on CentOS 7 / Fedora 34/33/32/31/30. 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 34/33/32/31/30
The podman package is available on Fedora & CentOS upstream repositories.
CentOS 7:
sudo yum -y install podman
Fedora:
sudo dnf install -y podman
To view installed package details, use rpm command.
$ rpm -qi podman
Name : podman
Epoch : 2
Version : 2.1.1
Release : 10.fc33
Architecture: x86_64
Install Date: Wed 28 Oct 2020 09:47:17 PM UTC
Group : Unspecified
Size : 46396620
License : ASL 2.0
Signature : RSA/SHA256, Sun 04 Oct 2020 11:34:54 PM UTC, Key ID 49fd77499570ff31
Source RPM : podman-2.1.1-10.fc33.src.rpm
Build Date : Sun 04 Oct 2020 11:25:22 PM UTC
Build Host : buildhw-x86-04.iad2.fedoraproject.org
Packager : Fedora Project
Vendor : Fedora Project
URL : https://podman.io/
Bug URL : https://bugz.fedoraproject.org/podman
Summary : Manage Pods, Containers and Container Images
Description :
...
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 34/32/32/31/30
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
Setup Docker Container Registry with Podman & Let’s Encrypt SSL
Publish Container Images to Docker Hub / Image registry with Podman
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
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK