s0x IT Services Cloud How to install the Podman container engine on CentOS 8

How to install the Podman container engine on CentOS 8

How to install the Podman container engine on CentOS 8 post thumbnail image

If you use either Red Hat or CentOS to deploy your containers, you’ll want to get up to speed with Podman.

Now that official support for the Docker container runtime has been dropped by RHEL 8/CentOS 8, what are container admins to do? Fortunately, the developers at Red Hat have been working on libpod for some time. Libpod is the new container management library, which includes everything necessary to manage pods, containers, and container images.

That new solution is called Podman which functions without requiring a container daemon, as all containers and pods are created as child processes. To everyone who has spent weeks, months, and years getting up to speed with the docker runtime, you have nothing to fear as the Podman CLI is based on the docker CLI.

I want to walk you through the steps for installing and using Podman on CentOS 8. 

SEE: Serverless computing: A guide for IT leaders (TechRepublic Premium)

What you’ll need

The only things you’ll need to make this work are:

How to install Podman

Podman doesn’t have its own installation package, because it is a part of another tool. So to gain access to Podman, open a terminal window on your CentOS 8 server and issue the command:

sudo dnf install @container-tools -y

That’s all there is to the installation.

How to use Podman

Let me show you how similar to Docker Podman is. Say, for instance you want to pull an image. If you’ve used the Docker pull command, you’ll recognize:

podman pull ubuntu

To list your existing images, issue the command:

podman images

The above command will list out all of the images you’ve pulled, along with the image ID.

To delete an image, you can do so using the image ID, just like you do with the Docker runtime. Issue the command:

podman rmi ID

Where ID is the ID of the image to be deleted.

Now, let’s say you want to deploy a container using the newly-downloaded Ubuntu image. I’m going to demonstrate an incredibly basic container deployment, one that will deploy a container based on the Ubuntu image and then use the echo command from within the container to print out the message, “Welcome to TechRepublic.” 

To deploy this container with Podman, issue the command:

podman run --rm ubuntu /bin/echo "Welcome to TechRepublic."

You should almost immediately see the text printed out (Figure A).

Figure A

<a href="http://s0x.org/wp-content/uploads/2020/01/how-to-install-the-podman-container-engine-on-centos-8.jpg" target="_blank" data-component="modalEnlargeImage" data-headline="

Our container was deployed.

” data-credit rel=”noopener noreferrer nofollow”>podmane-2.jpg

Our container was deployed.

Of course, that container isn’t going to do you much good. Let’s deploy a container that routes external port 8080 to internal port 8080. This can be done with the command:

sudo podman run -dit --name ubuntu-apache -p 8080:8080 ubuntu

We have to run this command with sudo as port bindings are not yet supported by rootless containers. 

To list your running containers you will have to, again, make use of sudo like so:

sudo podman ps

The above command will list out your running containers (Figure B).

Figure B

<a href="http://s0x.org/wp-content/uploads/2020/01/how-to-install-the-podman-container-engine-on-centos-8-1.jpg" target="_blank" data-component="modalEnlargeImage" data-headline="

Our running container.

” data-credit rel=”noopener noreferrer nofollow”>podmang.jpgpodmang.jpg

Our running container.

To stop that container, issue the command:

sudo podman stop ID

Where ID is the name of the container ID.

To delete the now stopped container, issue the command:

sudo podmand rm ID

Where ID is the name of the container ID.

And that’s the gist of installing and using the new container runtime engine, Podman. Stay tuned for more how-tos centered around this new technology.

Also see


Image: CentOS

Related Post

Google services knocked offline after fibre cables cutGoogle services knocked offline after fibre cables cut

<div class="teaser-image"> <a href="/it-infrastructure/8351/google-services-knocked-offline-after-fibre-cables-cut"><img src="http://s0x.org/wp-content/uploads/2019/12/google-services-knocked-offline-after-fibre-cables-cut-1.jpg" /></a> </div> <span class="field field-name-field-article-type field-type-taxonomy-term-reference field-label-hidden"> <span class="field-item even"><a href="/news">News</a></span> </span><div class="field field-name-field-published-date field-type-datetime field-label-hidden"> <div class="field-items"> <div class="field-item even"><span class="date-display-single">20 Dec, 2019</span></div> </div></div><span