How To Install Podman in Amazon Linux 2

ComputingPost
3 min readOct 21, 2022

The adoption of Containers and microservice architectures has been amazing and speedy in the past few years. Docker is widely used runtime engine in the deployment of containerized applications in Kubernetes, Development environments and other container platforms. A recent utility called Podman provided as part of the libpod library was released to help you create and maintain containers.

The following tutorial will teach you how to install Podman on Amazon Linux and perform some basic commands with Podman. Podman is an open source, daemonless, Linux native tool created to ease finding, building, running, sharing and deployment of applications using Open Containers Initiative (OCI) Containers and Container Images.

Install Podman in Amazon Linux 2

Login to an instance of Amazon Linux 2 running in the cloud or in your on-prem infrastructure.

$ ssh root@myamazonlinux

Last login: Thu Nov 29 19:30:17 2018 from gateway



__| __|_ )

_| ( / Amazon Linux 2 AMI

___|\___|___|



https://aws.amazon.com/amazon-linux-2/

43 package(s) needed for security, out of 109 available

Run "sudo yum update" to apply all updates

Confirm OS is correct.

$ cat /etc/os-release 

NAME="Amazon Linux"

VERSION="2"

ID="amzn"

ID_LIKE="centos rhel fedora"

VERSION_ID="2"

PRETTY_NAME="Amazon Linux 2"

ANSI_COLOR="0;33"

CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"

HOME_URL="https://amazonlinux.com/"

Update your OS

sudo yum -y update

sudo systemctl reboot

Disable Docker YUM repository:

sudo yum-config-manager --disable amzn2extra-docker

Enable EPEL repository on Amazon Linux 2:

sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Add the Kubic project project repository.

sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_7/devel:kubic:libcontainers:stable.repo

sudo yum -y install yum-plugin-copr

Install Podman on Amazon Linux 2:

sudo yum -y copr enable lsm5/container-selinux

sudo yum -y install podman

All dependencies are installed automatically.

...

Dependencies Resolved



======================================================================================================================================================================================================

Package Arch Version Repository Size

======================================================================================================================================================================================================

Installing:

podman x86_64 3.0.1-2.el7.3.1 devel_kubic_libcontainers_stable 21 M

Installing for dependencies:

audit-libs-python x86_64 2.8.1-3.amzn2.1 amzn2-core 79 k

catatonit x86_64 0.1.5-6.el7.3.1 devel_kubic_libcontainers_stable 326 k

checkpolicy x86_64 2.5-6.amzn2 amzn2-core 294 k

conmon x86_64 2:2.0.29-1.el7.1.2 devel_kubic_libcontainers_stable 45 k

container-selinux noarch 2:2.107-3.el7 copr:copr.fedorainfracloud.org:lsm5:container-selinux 39 k

containernetworking-plugins x86_64 1.0.0-0.2.rc1.el7.1.2 devel_kubic_libcontainers_stable 37 M

containers-common noarch 4:1-18.el7.22.1 devel_kubic_libcontainers_stable 57 k

criu x86_64 3.5-4.amzn2 amzn2-core 414 k

dnsmasq x86_64 2.76-16.amzn2.1.3 amzn2-core 279 k

fuse x86_64 2.9.2-11.amzn2 amzn2-core 86 k

fuse-overlayfs x86_64 1.5.0-1.el7.1.1 devel_kubic_libcontainers_stable 67 k

fuse3 x86_64 3.6.1-2.el7 epel 47 k

fuse3-libs x86_64 3.6.1-2.el7 epel 82 k

libcgroup x86_64 0.41-21.amzn2 amzn2-core 66 k

libnet x86_64 1.1.6-7.amzn2.0.2 amzn2-core 60 k

libnftnl x86_64 1.1.5-4.amzn2 amzn2-core 75 k

libselinux-python x86_64 2.5-12.amzn2.0.2 amzn2-core 237 k

libsemanage-python x86_64 2.5-11.amzn2 amzn2-core 115 k

libslirp x86_64 4.3.1-4.el7 devel_kubic_libcontainers_stable 60 k

nftables x86_64 1:0.9.0-14.amzn2.0.1 amzn2-core 252 k

podman-plugins x86_64 3.0.1-2.el7.3.1 devel_kubic_libcontainers_stable 2.5 M

policycoreutils-python x86_64 2.5-22.amzn2 amzn2-core 454 k

protobuf-c x86_64 1.0.2-3.amzn2.0.1 amzn2-core 29 k

python-IPy noarch 0.75-6.amzn2.0.1 amzn2-core 32 k

runc x86_64 2:1.0.1-0.el7.1.3 devel_kubic_libcontainers_stable 5.5 M

setools-libs x86_64 3.3.8-2.amzn2.0.2 amzn2-core 618 k

slirp4netns x86_64 1.1.8-4.el7.7.1 devel_kubic_libcontainers_stable 49 k



Transaction Summary

======================================================================================================================================================================================================

Install 1 Package (+27 Dependent packages)



Total download size: 70 M

Installed size: 174 M

Is this ok [y/d/N]: y

Confirm the installation of Podman on Amazon Linux 2 was successful.

$ podman version

Version: 3.0.1

API Version: 3.0.0

Go Version: go1.15.5

Built: Mon Mar 1 14:30:40 2021

OS/Arch: linux/amd64

Now that Podman has been installed on Amazon Linux

https://www.computingpost.com/how-to-install-podman-in-amazon-linux-2/?feed_id=15574&_unique_id=63524a85f2603

--

--

ComputingPost

ComputingPost — Linux Howtos, Tutorials, Guides, News, Tips and Tricks.