Podman : Install2025/11/12 |
|
Install Podman that is the Container management tool. |
|
| [1] | Install Podman. |
|
[root@dlp ~]# dnf -y install podman
|
| [2] | Download an official image and create a Container, next output the words [Welcome to the Podman World] inside the Container. |
|
# download the official image [root@dlp ~]# podman pull fedora Resolved "fedora" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf) Trying to pull registry.fedoraproject.org/fedora:latest... Getting image source signatures Copying blob 4f417555f8f8 done | Copying config a9005aba99 done | Writing manifest to image destination a9005aba99b11597d1540895839a1b78121a6b5c9e89cc91a19c1b9ff26441ac # run echo inside a container [root@dlp ~]# podman run fedora /bin/echo "Welcome to the Podman World" Welcome to the Podman World |
| [3] | Connect to the interactive session of a Container with [i] and [t] option like follows. If [exit] from the Container session, the process of a Container finishes. |
|
[root@dlp ~]#
bash-5.3# podman run -it fedora /bin/bash bash-5.3# # connected
cat /etc/os-release NAME="Fedora Linux" VERSION="43 (Container Image)" RELEASE_TYPE=stable ID=fedora VERSION_ID=43 VERSION_CODENAME="" PRETTY_NAME="Fedora Linux 43 (Container Image)" ANSI_COLOR="0;38;2;60;110;180" LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:43" DEFAULT_HOSTNAME="fedora" HOME_URL="https://fedoraproject.org/" DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f43/" SUPPORT_URL="https://ask.fedoraproject.org/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=43 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=43 SUPPORT_END=2026-12-02 VARIANT="Container Image" VARIANT_ID=containerbash-5.3# exit exit [root@dlp ~]# # come back
|
| [4] | If you'd like to run a Container as a Daemon, add [d] option. |
|
[root@dlp ~]# podman run -itd fedora /bin/bash b4ff1ebfc48912bd12e18e8a02a32061d49112325268a742624466a9c3298de5 # show podman processes [root@dlp ~]# podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b4ff1ebfc489 registry.fedoraproject.org/fedora:latest /bin/bash 15 seconds ago Up 16 seconds quirky_moser # attach to container session [root@dlp ~]# podman exec -it b4ff1ebfc489 /bin/bash bash-5.3# # connected bash-5.3# exit
# stop container process [root@dlp ~]# podman kill b4ff1ebfc489 [root@dlp ~]# podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
| Sponsored Link |
|
|