Linux code with hostname included
Image: Christian-P. Worring/Adobe Stock

As you know, Kubernetes has officially deprecated Docker support, which means anyone working with Kubernetes might have to change runtime environments. One such environment is nearly a drop-in replacement for Docker named Podman.

SEE: Hiring kit: Back-end Developer (TechRepublic Premium)

Podman is installed on RHEL-based server distributions by default and is available to install from the standard Ubuntu repositories. However, there are a few extra steps to take when installing Podman on Ubuntu.

Let me walk you through the process.

What you’ll need

The only things you’ll need to make this work are a running instance of Ubuntu Server 22.04 (Jammy Jellyfish) and a user with sudo privileges. That’s it. Let’s make some container magic.

How to install Podman

The first thing you should do is update and upgrade your instance of Ubuntu. Log into the server and issue the following two commands:

sudo apt update
sudo apt upgrade -y

When the upgrade completes, you’re ready to go. However, if the Linux kernel is upgraded in the process, you’ll need to first restart the server so the changes take effect. Restart with:

sudo reboot

After the reboot completes, log back in and install Podman with the command:

sudo apt install podman -y

How to add the default registries

Out of the box on Ubuntu Server, Podman does not include any registries. That means you won’t be able to pull down any images. We have to fix that. Open the registries file with the command:

sudo nano /etc/containers/registries.conf

You’ll see a lot of content that is all commented out. Scroll down to the bottom of that file and paste the following code:

registries=["", "", ""]

That will add the redhat, fedoraproject, and docker registries to Podman.

Save and close the file.

To verify the registries were added, issue the command:

podman info

You should see the following listed in the output:



There we go. We now have registries to pull from. Test it by pulling down the hello-world image with:

podman pull hello-world

You should see the following in the output:

Trying to pull
Getting image source signatures
Copying blob 2db29710123e done
Copying config feb5d9fea6 done
Writing manifest to image destination
Storing signatures

The last line will be a random string of characters indicating the ID of the image that was pulled.

You can keep pulling different images to further test Podman. Once you’re done, list out the images with:

podman images

You should see all the images you’ve pulled listed (Figure A).

Figure A

I've pulled down hello-world, nginx, and ubuntu images with Podman.
I’ve pulled down hello-world, nginx and ubuntu images with Podman.

Congratulations, you now have Podman up and running on Ubuntu Server 22.04. Enjoy that containerized power at your fingertips.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.