If you use Red Hat or CentOS to implement your containers, you want to be informed quickly with Podman.
How to install the Podman container engine on CentOS 8
If you use Red Hat or CentOS to implement your containers, you want to be informed quickly with Podman.
Now that official support for the Docker container runtime has been dropped by RHEL 8 / CentOS 8, what should container managers do? Fortunately, the developers of Red Hat have been working on libpod for quite some time. Libpod is the new library for container management, which contains everything needed to manage pods, containers and container images.
This new solution is called Podman, which functions without the need for a container daemon, because all containers and pods are created as underlying processes. For everyone who has been working with the docker runtime for weeks, months and years, you have nothing to fear, since the Podman CLI is based on the docker CLI.
I want to guide you through the steps for installing and using Podman on CentOS 8.
SEE: Serverless computer use: a guide for IT leaders (TechRepublic Premium)
What you need
The only things you need to make this work are:
How to install Podman
Podman does not have its own installation package because it is part of another utility. To access Podman, open a terminal window on your CentOS 8 server and give 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. For example, suppose you want to draw an image. If you have used the Docker pull command, you will recognize:
podman draws ubuntu
Run the command to display your existing images:
podman images
The above command displays all the images that you have retrieved, along with the image ID.
To delete an image, you can do this using the image ID, just like with the Docker runtime. Give the command:
podman rmi ID
True ID is the ID of the image to be deleted.
Now imagine that you want to implement a container with the newly downloaded Ubuntu image. I’m going to demonstrate an incredibly simple container deployment, one that implements a container based on the Ubuntu image and then uses the echo command from the container to print the “Welcome to TechRepublic” message.
To implement this container with Podman, give the order:
podman run –rm ubuntu / bin / echo “Welcome to TechRepublic.”
You should see the text printed almost immediately (Figure A).
Figure A
Our container was deployed.
Of course, that container won’t do you much good. Let’s use a container that leads external port 8080 to internal port 8080. This is possible with the command:
sudo podman run -this –name ubuntu-apache -p 8080: 8080 ubuntu
We must execute this command with sudo because port bindings are not yet supported by rootless containers.
To display your current containers, you must use sudo again as follows:
sudo podman ps
Your active containers are displayed with the above command (Figure B).
Figure B
Run the command to stop that container:
sudo podman stop ID
Where ID is the name of the container ID.
Run the command to delete the now stopped container:
sudo podmand rm ID
Where ID is the name of the container ID.
And that is the core of installing and using the new runtime engine for containers, Podman. Stay informed for more information about this new technology.
Cloud Insights newsletter
Your knowledge base for the latest news on AWS, Microsoft Azure, Google Cloud Platform, Docker, SaaS, IaaS, cloud security, containers, the public cloud, the hybrid cloud, the industry cloud and much more.
Delivered on Mondays
Register today
Also see
Image: CentOS