Sunday, June 21, 2026

Docker in Redhat Enterprise Linux 8.10

[root@192 ~]# dnf -y install podman
Updating Subscription Management repositories.
Last metadata expiration check: 0:11:44 ago on Sun 21 Jun 2026 09:44:38 AM EDT.
Package podman-4:4.9.4-30.module+el8.10.0+24081+a04d358a.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

 [root@192 ~]# dnf search podman
Updating Subscription Management repositories.
Last metadata expiration check: 0:08:56 ago on Sun 21 Jun 2026 09:44:38 AM EDT.
================================================ Name Exactly Matched: podman 

podman.x86_64 : Manage Pods, Containers and Container Images
=============================================== Name & Summary Matched: podman cockpit-podman.noarch : Cockpit component for Podman containers
pcp-pmda-podman.x86_64 : Performance Co-Pilot (PCP) metrics for podman containers
podman-docker.noarch : Emulate Docker CLI using podman
podman-manpages.noarch : Man pages for the podman commands
podman-plugins.x86_64 : Plugins for podman
podman-remote.x86_64 : A remote CLI for Podman: A Simple management tool for pods, containers and images
podman-tests.x86_64 : Tests for podman
python-podman-api.noarch : Podman API
python3-podman.noarch : RESTful API for Podman
==================================================== Name Matched: podman 
podman-catatonit.x86_64 : A signal-forwarding process manager for containers
podman-gvproxy.x86_64 : Go replacement for libslirp and VPNKit
====================================== Summary Matched: podman
toolbox.x86_64 : Script to launch privileged container with podman
toolbox.noarch : Script to launch privileged container with podman
[root@192 ~]# podman --version                      --> To Check podman version
podman version 4.9.4-rhel

[root@192 ~]# podman ps -a       --->To Check image running or not or, to check running or existed container
CONTAINER ID  IMAGE       COMMAND     CREATED     STATUS      PORTS       NAMES

or, 
[root@192 ~]# podman ps      --> To check running container
CONTAINER ID  IMAGE       COMMAND     CREATED     STATUS      PORTS       NAMES

[root@192 ~]# podman image list  / ls                    -->To check image
REPOSITORY  TAG         IMAGE ID    CREATED     SIZE

[root@192 ~]# podman network ls                    -->To Check/show network list
NETWORK ID    NAME        DRIVER
2f259bab93aa  podman      bridge
[root@192 ~]# podman volume ls                ---> To check/show volumes list

Go to the site,

https://hub.docker.com/    --> Create Account  -->Check Visibility (public/private)


 

In search bar, type nginx

[root@192 ~]# systemctl status nginx     --> To check nginx status
Unit nginx.service could not be found.

if nginx is running

[root@192 ~]# systemctl disable nginx
[root@192 ~]# systemctl stop nginx

To pull image

[root@192 ~]# podman pull nginx

--> podman pull <imagename> eg podman pull mysql      podman pull mariadb


  

Select docker.io/library/nginx:latest 

 

[root@192 ~]# podman image ls                     -->list of image  
REPOSITORY               TAG         IMAGE ID      CREATED     SIZE
docker.io/library/nginx  latest      eaf6f386053e  3 days ago  165 MB

To Run in container

[root@192 ~]# podman run --name test nginx
  

In another terminal, 

 

[root@192 ~]# curl 127.0.0.1
curl: (7) Failed to connect to 127.0.0.1 port 80: Connection refused
 

Need to map port

[root@192 ~]# podman run --name test11 -p 8080:80 nginx 

in another shell, [root@192 ~]# podman ps

In browser

[root@192 ~]#systemctl stop firewalld 

Console doesnot return so press ctrl+c

 

In another shell,

[root@192 ~]# podman ps

In browser,


 

Solution: run in background
[root@192 ~]# podman run --name test3 -d -p 8080:80 nginx
810e5930313bbfc57b25c428cc425a0e9502d462abfa7a34e7556179752e9b23

[root@192 ~]# systemctl stop firewalld

[root@192 ~]# podman ps

In browser


[root@192 ~]# podman ps -a                 



To remove container                    -->podman containe tm <container name>

[root@192 ~]# podman container rm test11                -->remove all container except test3
test11
[root@192 ~]# podman ps -a
CONTAINER ID  IMAGE                           COMMAND               CREATED            STATUS                        PORTS                 NAMES
47ee0c6288a9  docker.io/library/nginx:latest  nginx -g daemon o...  2 hours ago        Exited (0) About an hour ago                        test
0e6799e84cb2  docker.io/library/nginx:latest  nginx -g daemon o...  About an hour ago  Exited (0) About an hour ago                        testt
828b8dd0e648  docker.io/library/nginx:latest  nginx -g daemon o...  About an hour ago  Exited (0) About an hour ago  0.0.0.0:8080->80/tcp  test1
810e5930313b  docker.io/library/nginx:latest  nginx -g daemon o...  13 minutes ago     Up 13 minutes                 0.0.0.0:8080->80/tcp  test3

[root@192 ~]#podman exec -it test3 bash           -->exec (executable), -it (interactive mode)

To replace nginx with your name
root@810e5930313b:/# cd /etc/nginx/conf.d/

root@810e5930313b:/etc/nginx/conf.d# ls
default.conf

root@810e5930313b:/etc/nginx/conf.d# cat default.conf

root@810e5930313b:/etc/nginx/conf.d# cd /usr/share/nginx/html/
root@810e5930313b:/usr/share/nginx/html# ls
50x.html  index.html

root@810e5930313b:/usr/share/nginx/html# echo "hello Centos" > index.html

In browser,

 

root@810e5930313b:~# exit
exit
[root@192 ~]# firewall-cmd --list-all
FirewallD is not running

if running

[root@192 ~]# systemctl stop firewalld

[root@192 ~]# podman ps -a
CONTAINER ID  IMAGE                           COMMAND               CREATED            STATUS            PORTS                 NAMES
810e5930313b  docker.io/library/nginx:latest  nginx -g daemon o...  About an hour ago  Up About an hour  0.0.0.0:8080->80/tcp  test3
[root@192 ~]# podman container stop test3
test3
[root@192 ~]# podman container rm test3
test3