Install and Use Podman on Debian 12 Bookworm: Best Container Manager

In this tutorial, you will learn to Install and Use Podman on Debian 12 Bookworm. You can install Podman from the APT repository. Podman is an open-source container management tool for Linux-based distros that can be used for:

  • developing
  • managing
  • and running OCI containers.

Follow the below guide steps on the Orcacore website to Install and Use Podman on Debian 12 Bookworm.

How To Install and Use Podman on Debian 12 Bookworm?

To Install and Use Podman on Debian 12 Bookworm, you must have access to your server as a non-root user with sudo privileges. For this purpose, you can check this guide on Initial Server Setup with Debian 12 Bookworm.

Now proceed to the following steps to Install and Use Podman on Debian 12 Bookworm.

Step 1 – Install Podman with APT on Debian 12

First, you must run the system update by using the command below:

sudo apt update

Podman packages are available in the default Debian 12 repository. So use the following command to install Podman on your server:

sudo apt install podman -y

Then, verify your installation by checking its version:

podman --version
Output
podman version 4.3.1

Step 2 – How To Start Podman on Debian Linux?

At this point, you can start and enable your Podman service by using the following commands:

# sudo systemctl start podman.socket
# sudo systemctl enable podman.socket

Check your podman service is active and running on Debian 12:

sudo systemctl status podman.socket
Start Podman on Debian Linux

To get complete information about Podman, you can use the command below:

podman info
podman info command

Step 3 – How To Configure Podman Registries on Debian Linux?

At this step of Install and Use Podman on Debian 12 Bookworm, you need to configure podman registries. Podman has a great feature that allows you to search and pull images from any registry. You can edit the registry file and define the list of container registries. To do this, you can open the file with the following command:

sudo vi /etc/containers/registries.conf

Add the following content to the file:

unqualified-search-registries = [ 'registry.access.redhat.com', 'registry.redhat.io', 'docker.io']

When you are done, save and close the file.

With this option, when you run the podman search or podman pull command, Podman will contact these registries beginning with the first one in that order.

Restart the Podman service to apply the changes on Debian 12:

sudo systemctl restart podman.socket

Step 4 – How To Use Podman on Debian 12 Bookworm?

If you have Podman installed and configured on your server, you can start using it. We will show you how to search and pull images with Podman and create a container. Follow the steps below to complete the guide on Install and Use Podman on Debian 12 Bookworm.

Search Images with Podman

Now just like Docker, you can use the Podman search command to search an image. For example, search for the Debian image by using the command below:

podman search debian
Search Images with Podman

Download or Pull Images with Podman

At this point, you can easily pull your searched image by using the command below:

podman pull debian
Download or Pull Images with Podman

List All Downloaded Images with Podman

If you have downloaded multiple images and now want to see what are the available images on your Debian 12, you can list all of them using the following Podman command:

podman images

In my case:

List All Downloaded Images with Podman

Create a Container with Downloaded Images with Podman

Once you have the image of the application you want, you can create a container with it. Here we have downloaded the Debian image with Podman. Now we will show how to use it to make a container using a Debian image.

To do this, you can use the following command:

podman run -dit --name orca debian

Note–name is a parameter to give the container whatever friendly name you want to assign.

To access your Container command line, use the following command:

podman attach orca

You will see that your command prompt changes to your container ID:

deb@305535c6f095:/#

To start your container, you can use the command below:

podman start container-id or name

To stop your container, you can use the following command:

podman stop container-id or name

For more information, you can visit the Podman Documentation page.

Conclusion

At this point, you have learned to Install and Use Podman on Debian 12 Bookworm Configure the Podman registries and Use it to search and pull images and create a container with it.

Hope you enjoy it. You may also interested in these articles:

Install and Use Iptables on Debian Linux

Install and Secure SSH Server on Debian 12 Bookworm

How To Install Samba File Sharing on Debian 12

Install LibreOffice with Deb File on Debian Linux

Share your love

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!