Podman emerges as a solid alternative to Docker in component management. Can I install it? Of course, you can, and moreover, it is easy. So, in this post, you will learn how to install Podman on Ubuntu 22.04.
Introduction to Podman
Docker is one of the most popular container solutions, but it is not alone in the market. To offer an alternative focused on process management, Podman was born.
You could say that Podman is an application very similar to Docker because they are designed for the same thing: container management. However, Podman is intended as a pod manager for the creation and subsequent processing of containers. Of course, it is compatible with the OCI container specifications so the same containers you use in Docker, you can use with Podman.
The biggest advantage Podman offers over Docker are that it dispenses with a centralized daemon and root rights. This situation brings two immediate consequences, which are the increase in security and efficiency in container startup times.
Another fundamental aspect is that the compatibility that Podman has with Docker is very high. Therefore, performing migrations between the two is a simple task.
So, it is a good idea to learn how to install Podman to give it a try over Docker.
Install Podman on Ubuntu 22.04
The process of installing Podman is simple thanks to the fact that it is present and supported by many Linux distributions. As you can guess, Ubuntu 22.04 will be no exception.
So first open a terminal or connect via SSH and update the system completely:
sudo apt update sudo apt upgrade
Then, install Podman
sudo apt install podman
The installation process should not take many minutes because it is quite light. When it’s finished, you can check the installed version.
podman version 3.4.4
Or by running this command
With the latter, you will get much more important information.
By default, on Ubuntu servers, Podman does not include any configured registry. The consequence of this is that you will not be able to download any images. Of course, you have to fix this.
To achieve this, edit the file
sudo nano /etc/containers/registries.conf
At the end of the file, add these lines
[registries.search] registries=["registry.access.redhat.com", "registry.fedoraproject.org", "docker.io"]
Save the file and when you exit the editor the changes will be ready.
As you can notice three main sources have been added which are Red Hat, Fedora, and Docker. So, this should be enough.
If you want to verify the changes, just run again this command
. . . registries: search: - registry.access.redhat.com - registry.fedoraproject.org - docker.io . . .
Testing Podman on Ubuntu 22.04
To find out if podman is running smoothly, it is best to use it. Therefore, to achieve that, download and run the
hello-world image. It is a simple image, intended for testing.
In the terminal, all you have to do is:
podman pull hello-world
Finally, consult the images that are in the system
You will have a screen output like this
So, Podman is installed correctly.
Uninstall Podman on Ubuntu 22.04
If you no longer want to use Podman on your system, the best thing to do is to remove it. To achieve this, just run.
sudo apt remove podman
It is as simple as this.
Podman is an important tool that will gain more importance every day due to the strong support that the open-source community offers. Supported by many distributions and especially Red Hat, it is significant to know it.
I hope you liked this post and help us to share it to grow.