How to Install Podman on Debian 11

Install Podman on Debian 11

In this article, we will have explained the necessary steps to install Podman on Debian 11. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Podman is a free, daemonless, open-source container engine designed as a drop-in replacement for the popular Docker runtime engine. Just like Docker, it makes it easy to build, run, deploy, and share applications using container images and Open Container Initiative (OCI) containers. The only difference is that Podman doesn’t require a daemon to run containers, while Docker needs the Docker Engine daemon.

Install Podman on Debian 11

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

sudo apt update
sudo apt upgrade
sudo apt install software-properties-common wget

Step 2. Install Podman.

Installing Podman on your Debian system is straightforward, You can install it by just running the following command:

sudo apt install podman

To check the installed version of Podman, do the following:

podman --version

You can get more information about Podman using the following command:

podman info

Step 3. Configure the Podman.

The registry.conf the registry file is a configuration file that specifies the container registries to use when you want to push or pull an image. The full path to the file is /etc/containers/registries.conf. So you will need to edit it and define the registry:

nano /etc/containers/registries.conf

Add the following lines:

[registries.insecure]
registries = [ ]
# If you need to block pull access from a registry, uncomment the section below
# and add the registries fully-qualified name.
# Docker only
[registries.block]
registries = [ ]

Step 4. How to Use Podman.

We will show you how to use the Podman command to pull images and run a container. To pull a Debian image, run the following command:

podman pull ubuntu

You can see your downloaded image using the following command:

podman images

Then, run a container from the Ubuntu image using the following command:

podman run -dit ubuntu:latest

You can list all running containers using the following command:

podman ps

The below table shows the most commonly used commands in Podman:

Command Description
podman –help Retrieve Podman help information.
man podman Retrieve detailed Podman information.
podman search some image Find images (as with most Unix programs). Input the image name.
podman pull someregistry.org/someimage Download an image. Input the name of the registry and image.
podman someimages See podman search for some images. Use the full name of an image (e.g., someregistry.org/someimages/version1.0.1) as they are stored in a different registry.
podman run -dt -p 8080: 80 / tcp someregistry.org/someimages Start the container.
podman ps View the list of running containers.
podman ps -aB View the list of all containers (created, completed, and launched).
podman inspect -l | grep ipaddress View the running container.
A container can work in non-root mode, so it is not assigned an IP address.
podman logs -l View container logs.
podman top -l View PID containers.
podman stop -l Stop a container.
podman rm -l Remove a container.

That’s all you need to do to install Podman on Debian (Bullseye). I hope you find this quick tip helpful. For further reading Podman on Debian’s system, please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.