Container vir­tu­al­iza­tion has become more important in recent years. Having become popular thanks to Docker released in 2013, the tech­nol­o­gy is now a basic component of a wide range of tools for managing virtual name­spaces. One of the most in­ter­est­ing solutions is Podman. Orig­i­nal­ly designed as a debugging tool for CRI-O that was intended to make it easier to work with Ku­ber­netes clusters, the software has quickly become an extensive engine for managing con­tain­ers in its own right.

Note

Name­spaces enable you to group selected code elements (e.g. classes) in a container.

Learn more about what makes Podman so special and how to use the container tool.

What Is Podman?

Podman (short for Pod Manager) is a container engine that was first released in February 2018. It was developed by the American software company Red Hat, which is primarily known for high-per­for­mance en­ter­prise solutions for a range of open-source projects such as Red Hat En­ter­prise Linux (RHEL) or OpenStack. Building on ex­pe­ri­ences with Docker, Podman was not orig­i­nal­ly designed as a stand­alone engine but intended as a debugging tool for CRI-O. This plan was quickly discarded.

The container software is similar to Docker in many aspects and uses the same command line in­ter­preter as the industry standard. This enables you to use typical Docker commands in Podman – the alias simply needs to be set to alias docker=podman. Switching from Docker to Podman is therefore rel­a­tive­ly easy in most cases. The key dif­fer­ence is that Podman does away with a central daemon as the control instance for the in­di­vid­ual con­tain­ers. This allows you to access the various vir­tu­al­ized ap­pli­ca­tions without root rights.

Note

A daemon refers to a program in Unix/Linux operating systems that runs in the back­ground and provides certain services and processes.

Podman runs on all common Linux dis­tri­b­u­tions such as Ubuntu, Fedora, CentOS, Debian, and RHEL as well as Raspbian (Raspberry Pi operating system). Here, the engine can usually be installed directly via the package man­age­ment of the re­spec­tive system.

Tip

In our Digital Guide, you will also find in­for­ma­tion on "Podman vs. Docker – what is the future in the container world?".

Podman: structure and function

Besides doing away with a central daemon, the key dis­tin­guish­ing char­ac­ter­is­tics of Podman include the “pods”. These pods – based on the Ku­ber­netes pod concept – refer to groups of multiple con­tain­ers within a shared Linux namespace which share certain resources. This way, a wide range of vir­tu­al­ized ap­pli­ca­tions can be flexibly combined.

As mentioned earlier, it’s possible to run the in­di­vid­ual con­tain­ers on the host as a normal user without root rights – the processes are only root-con­trolled within a container. This is possible since Podman accesses the user name­spaces of the Linux kernel which assign special rights and user IDs to the processes. The fact that the con­tain­ers are actually run as ad­min­is­tra­tor gives the vir­tu­al­ized Podman en­vi­ron­ment a high level of security.

Infra Con­tain­ers represent the heart of a pod. They are ex­clu­sive­ly re­spon­si­ble for pod func­tion­al­i­ty and therefore manage and ensure the in­di­vid­ual resources such as name­spaces, network ports, CPU, working memory etc. What’s more, Podman utilizes the Conmon mon­i­tor­ing tool, written in C, for pod man­age­ment. This tool monitors the in­di­vid­ual vir­tu­al­ized com­po­nents and secures logs, for instance. The tool also acts as an interface with the terminal of the re­spec­tive container. Podman uses the software runC as runtime for the con­tain­ers; it is also used in many other solutions like Docker or rkt.

Podman tutorial: first steps with Podman

After having in­tro­duced the basics of Podman, we’ll now summarize the key points for getting started with the container engine in the following Podman tutorial.

In­stalling Podman on Linux

Podman is a software program for running Linux con­tain­ers. The tool is quick and easy to install on Linux dis­tri­b­u­tions such as CentOS, Ubuntu, Debian, and others. In most cases, the in­stal­la­tion packages can be found directly in the package man­age­ment of the re­spec­tive system software and installed using the typical terminal commands.

Note

As an al­ter­na­tive to native packages in the system repos­i­to­ry, the Kubic project on opensuse.org provides different Podman in­stal­la­tion packages for various dis­tri­b­u­tions and releases.

Debian, Ubuntu, Raspbian:

sudo apt-get update -qq
sudo apt-get -qq -y install podman

Fedora, CentOS, Amazon Linux 2, RHEL 7:

sudo yum -y install podman

OpenSUSE:

sudo zipper install podman

In­stalling Podman on Windows and macOS

Podman is at home in Linux en­vi­ron­ments. But you can also use the container engine on devices that use the Windows or macOS operating system. This requires access to a Linux in­stal­la­tion on these devices, either via a virtual machine on the host or via the network.

If you have access, you only need a Podman remote client in order to establish an SSH con­nec­tion with the Podman backend.

Note

In­for­ma­tion regarding the SSH con­nec­tion needs to be entered in the con­fig­u­ra­tion file podman-remote.conf. The following Podman remote client tutorial on GitHub provides extensive in­for­ma­tion about setup and use.

How container image man­age­ment works with Podman

In terms of features and syntax, Podman is primarily based on Docker. When con­fig­ur­ing the desired con­tain­ers, you can therefore use the vast pool of ready-to-use Docker images – also known as Docker Hub. For instance, using the pull command, you can download ap­pli­ca­tion images such as the latest version of Ubuntu:

podman pull hub.docker.com/_/ubuntu:latest

The official storage path for in­di­vid­ual images is the local path /.local/share/con­tain­ers/; here each user has their own namespace, meaning the container setup is separated from the root setup, for example. Get an overview of the locally stored images with the following command:

podman images

Use the “sudo” prefix typical for Linux for a list of root images:

sudo podman images
Go to Main Menu