How to install Podman on Ubuntu

Jack Wallen walks you through {the procedure} of {setting up} the container runtime Podman on Ubuntu Server 22.04.

{Picture}: fatmawati/Adobe {Share}

{You may already know}, Kubernetes has {formally} deprecated Docker support, {this means} anyone {operating|functioning} with Kubernetes {may need to} change runtime environments. {One particular} environment {‘s almost} a drop-in {alternative to} Docker named Podman.

{Notice}: Hiring {package}: Back-end {Programmer} (TechRepublic {High quality|Superior})

Podman is {set up} on RHEL-based server distributions {automagically} and is available {to set up} from {the typical} Ubuntu repositories. {Nevertheless}, {there are some} extra {actions|methods|ways|measures|tips} to take when {setting up} Podman on Ubuntu.

{I want to} walk you through {the procedure}.

What you’ll {want}

{The only real} things you’ll need to {get this to} work are a running {example} of Ubuntu Server 22.04 (Jammy Jellyfish) and a {consumer} with sudo privileges. That’s it. Let’s {create} some container magic.

{How exactly to} install Podman

The first thing {you need to} do is {up-date|upgrade|revise} and upgrade your {example} of Ubuntu. Log {in to the} server and issue {the next} two commands:

sudo apt {up-date|upgrade|revise}
sudo apt {update|improve|enhance} -y

{Once the} upgrade completes, you’re {all set}. {Nevertheless}, if the Linux kernel {will be} upgraded {along the way}, you’ll need to {1st|very first|initial} restart the server {therefore the} changes take {impact}. Restart with:

sudo reboot

{Following the} reboot completes, log {back} and install Podman with the {control|order}:

sudo apt install podman -y

How to {include} the default registries

Out of the {package|container} on Ubuntu Server, Podman {will not} include any registries. {Which means} you won’t {have the ability to} pull down any {pictures}. {We need to} fix that. {Open up} the registries {document} with the {control|order}:

sudo nano /etc/containers/registries.conf

You’ll see a {large amount of} content {that’s} all commented out. Scroll {right down to} the bottom {of this} file and paste {the next} code:

[registries.{research|lookup}]
registries=["registry.{entry|accessibility|gain access to}.redhat.com", "registry.fedoraproject.org", "docker.io"]

That will {include} the redhat, fedoraproject, and docker registries to Podman.

Save and {near} the file.

To verify the registries were added, {problem|concern} the command:

podman {information|details}

You should {start to see the} following {outlined|detailed|shown} in the {result}:

registries:

                {research|lookup}:               
                - registry.{entry|accessibility|gain access to}.redhat.com               
                - registry.fedoraproject.org               
                - docker.io               

There we go. {We’ve} registries to {draw} from. {Test drive it} by pulling down the hello-world {picture} with:

podman pull hello-{globe|planet|entire world}

You should {start to see the} {pursuing|adhering to|using|right after|sticking with} in the {result}:

Trying to {draw} docker.io/library/hello-world:{most recent}...
Getting image {resource|supply} signatures
Copying blob 2db29710123e {carried out|completed|performed|accomplished}
Copying config feb5d9fea6 {carried out|completed|performed|accomplished}
{Composing|Creating} manifest to image {location}
{Keeping} signatures
feb5d9fea6a5e9606aa995e879d862b825965ba48de054caab5ef356dc6b3412

The last line {is a} random string of {figures|character types|heroes|personas|people} indicating the ID of the {picture} that was pulled.

{It is possible to} keep pulling different {pictures} to further test Podman. {As soon as} you’re done, {listing|checklist} out the {pictures} with:

podman {pictures}

You should see {all of the} images you’ve pulled {outlined|detailed|shown} ( {Physique|Number|Shape|Body|Amount} A ).

{Physique|Number|Shape|Body|Amount} A

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

Congratulations, {at this point you} have Podman {ready to go} on Ubuntu Server 22.04. Enjoy that containerized power {close at hand}.

{Sign up to} TechRepublic’s {STEPS TO MAKE} Tech {Focus on} YouTube {for all your} latest tech advice for {company} {benefits|advantages} from Jack Wallen.