how to install Podman
how to install Podman

How To Install Podman On Ubuntu 20.04 LTS

In this short tutorial, we will learn how to install Podman on Ubuntu 20.04 LTS oeprating system.


Podman (POD Manager) is a tool to manage OCI containers and pods. It is an open-source project which can be used in most Linux distributions that use daemonless container engine. Podman and Docker use two different architectures. Docker depends on daemon for all its functionality where Podman directly interacts using runC. Podman has more functionalities in the Kubernetes environment. Commands are very similar to Docker and can work on root and rootless mode. Much different from other container runtime podman has the ability to deploy pods.

In this article, we are going to explain how to install Podman on Ubuntu 20.04 and learn its basic usage to manage images and containers.

Podman Installation On Ubuntu 20.04 Linux Operating System

Podman Installation in this tutorial will be consist of several as steps as shown below :

  1. Update Ubuntu Repository
  2. Add the Podman repository
  3. Install Podman On Ubuntu 20.04
  4. Verify the Podman Installation

The details of installation will be detail discussed below.

1. Update Ubuntu Repository

In this stage we will update our Ubuntu repository, by updating repository we will not only install the latest available security updates but also rebuild the repository cache. For this purpose we will submit the command line :

$ sudo apt update

2. Add Podman Repository

Since podman is not available on default Ubuntu 20.04 repository, we need to add the podman repository manually. But for Ubuntu 20.10 or newer the Podman has been included as standard repository. We will ddd Kubic project repository to our Ubuntu 20.04, we will do following command line :

sudo sh -c "echo 'deb${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
$ wget -nv${VERSION_ID}/Release.key -O- | sudo apt-key add -

Output :

rapik@worker2:~$ sudo sh -c "echo 'deb${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
[sudo] password for rapik: 
rapik@worker2:~$ wget -nv${VERSION_ID}/Release.key -O- | sudo apt-key add -
2021-10-27 20:49:16 URL: [1093/1093] -> "-" [1]

3. Install Podman On Ubuntu 20.04

Once the repository is added, we will install Podman by submitting command line :

$ sudo apt update
$ sudo apt-get install podman

Output :

rapik@worker2:~$ sudo apt update
rapik@worker2:~$ sudo apt-get install podman
Selecting previously unselected package libfuse3-3:amd64.
(Reading database ... 142628 files and directories currently installed.)
Preparing to unpack .../libfuse3-3_3.9.0-2_amd64.deb ...
Unpacking libfuse3-3:amd64 (3.9.0-2) ...
dpkg: fuse: dependency problems, but removing anyway as you requested:
 xdg-desktop-portal depends on fuse; however:
  Package fuse is to be removed.
 open-vm-tools-desktop depends on fuse.
 ntfs-3g depends on fuse.
 gvfs-fuse depends on fuse.

(Reading database ... 142636 files and directories currently installed.)
Removing fuse (2.9.9-3) ...
update-initramfs: deferring update (trigger activated)
Selecting previously unselected package fuse3.
(Reading database ... 142626 files and directories currently installed.)
Preparing to unpack .../00-fuse3_3.9.0-2_amd64.deb ...
Unpacking fuse3 (3.9.0-2) ...
Selecting previously unselected package catatonit.
Preparing to unpack .../01-catatonit_0.1.5~1_amd64.deb ...
Unpacking catatonit (0.1.5~1) ...
Selecting previously unselected package conmon.
Preparing to unpack .../02-conmon_100%3a2.0.30-2_amd64.deb ...
Unpacking conmon (100:2.0.30-2) ...
Selecting previously unselected package containers-common.
Preparing to unpack .../03-containers-common_100%3a1-21_all.deb ...
Unpacking containers-common (100:1-21) ...
Selecting previously unselected package libnet1:amd64.
Preparing to unpack .../04-libnet1_1.1.6+dfsg-3.1build1_amd64.deb ...
Unpacking libnet1:amd64 (1.1.6+dfsg-3.1build1) ...
Selecting previously unselected package libprotobuf-c1:amd64.
Preparing to unpack .../05-libprotobuf-c1_1.3.3-1_amd64.deb ...
Unpacking libprotobuf-c1:amd64 (1.3.3-1) ...
Selecting previously unselected package criu.
Preparing to unpack .../06-criu_3.16.1-1_amd64.deb ...
Unpacking criu (3.16.1-1) ...
Selecting previously unselected package crun.
Preparing to unpack .../07-crun_100%3a1.2-2_amd64.deb ...
Unpacking crun (100:1.2-2) ...
Selecting previously unselected package fuse-overlayfs.
Preparing to unpack .../08-fuse-overlayfs_100%3a1.5.0-1_amd64.deb ...
Unpacking fuse-overlayfs (100:1.5.0-1) ...
Selecting previously unselected package podman-plugins.
Preparing to unpack .../09-podman-plugins_100%3a1.2.0-1_amd64.deb ...
Unpacking podman-plugins (100:1.2.0-1) ...
Selecting previously unselected package podman-machine-cni.
Preparing to unpack .../10-podman-machine-cni_100%3a0.0.0-1_amd64.deb ...
Unpacking podman-machine-cni (100:0.0.0-1) ...
Selecting previously unselected package podman.
Preparing to unpack .../11-podman_100%3a3.3.1-1_amd64.deb ...
Unpacking podman (100:3.3.1-1) ...
Selecting previously unselected package slirp4netns.
Preparing to unpack .../12-slirp4netns_100%3a1.1.8-3_amd64.deb ...
Unpacking slirp4netns (100:1.1.8-3) ...
Selecting previously unselected package uidmap.
Preparing to unpack .../13-uidmap_1%3a4.8.1-1ubuntu5.20.04.1_amd64.deb ...
Unpacking uidmap (1:4.8.1-1ubuntu5.20.04.1) ...
Selecting previously unselected package containernetworking-plugins.
Preparing to unpack .../14-containernetworking-plugins_100%3a1.0.0-1_amd64.deb ...
Unpacking containernetworking-plugins (100:1.0.0-1) ...
Setting up slirp4netns (100:1.1.8-3) ...
Setting up uidmap (1:4.8.1-1ubuntu5.20.04.1) ...
Setting up libnet1:amd64 (1.1.6+dfsg-3.1build1) ...
Setting up libprotobuf-c1:amd64 (1.3.3-1) ...
Setting up podman-machine-cni (100:0.0.0-1) ...
Setting up conmon (100:2.0.30-2) ...
Setting up containernetworking-plugins (100:1.0.0-1) ...
Setting up catatonit (0.1.5~1) ...
Setting up containers-common (100:1-21) ...
Setting up podman-plugins (100:1.2.0-1) ...
Setting up libfuse3-3:amd64 (3.9.0-2) ...
Setting up criu (3.16.1-1) ...
Setting up crun (100:1.2-2) ...
Setting up podman (100:3.3.1-1) ...
Setting up fuse3 (3.9.0-2) ...
Installing new version of config file /etc/fuse.conf ...
update-initramfs: deferring update (trigger activated)
Setting up fuse-overlayfs (100:1.5.0-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for initramfs-tools (0.136ubuntu6) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-26-generic

4. Verify Podman Installation

Until this step, the Podman installation is completed done. Then we will verify it by querying its version and and other information. We will use following command line :

$ sudo podman --version
$ sudo podman info

Output :

rapik@worker2:~$ sudo podman --version
podman version 3.3.1
rapik@worker2:~$ sudo podman info
  arch: amd64
  buildahVersion: 1.22.3
  - cpuset
  - cpu
  - cpuacct
  - blkio
  - memory
  - devices
  - freezer
  - net_cls
  - perf_event
  - net_prio
  - hugetlb
  - pids
  - rdma
  cgroupManager: systemd
  cgroupVersion: v1
    package: 'conmon: /usr/libexec/podman/conmon'
    path: /usr/libexec/podman/conmon
    version: 'conmon version 2.0.30, commit: '
  cpus: 2
    distribution: ubuntu
    version: "20.04"
  eventLogger: journald
    gidmap: null
    uidmap: null
  kernel: 5.4.0-26-generic
  linkmode: dynamic
  memFree: 5036441600
  memTotal: 8319868928
    name: crun
    package: 'crun: /usr/bin/crun'
    path: /usr/bin/crun
    version: |-
      crun version UNKNOWN
      commit: ea1fe3938eefa14eb707f1d22adff4db670645d6
      spec: 1.0.0
  os: linux
    path: /run/podman/podman.sock
    apparmorEnabled: true
    rootless: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
    executable: /usr/bin/slirp4netns
    package: 'slirp4netns: /usr/bin/slirp4netns'
    version: |-
      slirp4netns version 1.1.8
      commit: unknown
      libslirp: 4.3.1-git
      libseccomp: 2.4.3
  swapFree: 968105984
  swapTotal: 968105984
  uptime: 53m 43.76s
  configFile: /etc/containers/storage.conf
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
    number: 0
  runRoot: /run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
  APIVersion: 3.3.1
  Built: 0
  BuiltTime: Wed Dec 31 16:00:00 1969
  GitCommit: ""
  GoVersion: go1.16.6
  OsArch: linux/amd64
  Version: 3.3.1

5. Using Podman (Example)

In this stage, we will try to use podman by pulling any applications to run on Podman. On this example we will run mariadb on podman. For this purpose, we will do following command lines :

$ podman search mariadb
$ sudo podman pull mariadb
$ sudo podman images
$ sudo podman ps -a

Output :

rapik@worker2:~$ podman search mariadb
INDEX       NAME                                                          DESCRIPTION                                      STARS       OFFICIAL    AUTOMATED                                     MariaDB Server is a high performing open sou...  4413        [OK]                                 A Mariadb container, brought to you by Linux...  257                                               Docker image for mariadb                         23                      [OK]                          MariaDB 10.1 SQL database server                 12                                                    Alpine-based MariaDB container image with or...  6                       [OK]                                      MariaDB Server is a modern database for mode...  39                      [OK]                   An APB which deploys RHSCL MariaDB               0                       [OK]                                   Extension of the mariadb image that forces a...  16                                       MariaDB 10.2 SQL database server                 6                                           MariaDB with Galera                              2                       [OK]                                    MariaDB MaxScale - The world's most advanced...  16                      [OK]                MariaDb w/ Galera Cluster, DNS-based service...  34                      [OK]                          MariaDB 10.3 SQL database server                 1                                                 ARMHF based image of mariadb      17                                                Mariadb with Galera support                      2                       [OK]                                    An image of the MariaDB SQL database server ...  0                                                MariaDB relational database management syste...  3                       [OK]                               MariaDB Galera Cluster                           22                      [OK]                               Lightweight MariaDB docker image with Alpine...  15                      [OK]                             Dockerized Automated MariaDB Galera Cluster ...  41                      [OK]                                       Non-root Docker image running Alpine Linux a...  0                                                   MariaDB Server is a high performing open sou...  19                                                Docker MariaDB server w/ S6 Overlay, Zabbix ...  2                       [OK]                                     CircleCI test images for MariaDB                 0                       [OK]                                   Fast, simple, and lightweight MariaDB Docker...  2                       [OK]                                       Official build of [Bitnami MariaDB](https://...  0                                         MariaDB is a multi-user, multi-threaded SQL ...  0                                                                   0                                                                         0                                                                   0                                                                         0                                                                                               0                                   Container image openstack-mariadb:current-tr...  0                                     Container image openstack-mariadb                0                                                                                                       0                                                                                               0                                    Container image openstack-mariadb                0                           Container image centos-binary-mariadb            0                                 Container image centos-binary-mariadb:curren...  0                                                                 0                                                                   0                                                                                      0                                                                         0                                                                   0                                                   # [Opencast Docker images](  0                                                                         0                                                                                               0                                  Container image centos-binary-mariadb:curren...  0                                                                                0                  
rapik@worker2:~$ sudo podman pull mariadb
Trying to pull
Getting image source signatures
Copying blob b4cd9409b0f6 done  
Copying blob 5c37daf8b6b5 done  
Copying blob dbcda06785eb done  
Copying blob 034655750c88 done  
Copying blob f0b757a2a0f0 done  
Copying blob 7b1a6ab2e44d done  
Copying blob a34cd90f184c done  
Copying blob fd6cef4ce489 done  
Copying blob 3cb89a1550ea done  
Copying blob df9f153bd930 done  
Copying config 12e05d5da3 done  
Writing manifest to image destination
Storing signatures
rapik@worker2:~$ sudo podman images
REPOSITORY                 TAG         IMAGE ID      CREATED      SIZE  latest      12e05d5da3c5  12 days ago  416 MB
rapik@worker2:~$ sudo podman ps -a
rapik@worker2:~$ sudo podman run -d  --name otomariadb
rapik@worker2:~$ sudo podman ps -a
CONTAINER ID  IMAGE                             COMMAND     CREATED        STATUS                    PORTS       NAMES
6ae59b21c735  mysqld      7 seconds ago  Exited (1) 6 seconds ago              otomariadb


On this tutorial we have learnt how to install Podman on Ubuntu 20.04 LTS operating system successfully.

(Visited 205 times, 1 visits today)


No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *