Podman : Install2025/04/25 |
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 3f7284d6b026 done | Copying config e5bf03515e done | Writing manifest to image destination e5bf03515e9265c85324967a93389be8a4374ca1dc68ed2f34202dd2dde3ba82 # 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 ~]#
[root@28a05fc0e9b4 /]# podman run -it fedora /bin/bash [root@28a05fc0e9b4 /]# # connected
uname -a Linux 28a05fc0e9b4 6.14.3-300.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Apr 20 16:08:39 UTC 2025 x86_64 GNU/Linux [root@28a05fc0e9b4 /]# 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 760f74cf9b86e7a74949eb29dbbc23e8b53bffdd35031ccfae40c02daa9a1fd6 # show podman processes [root@dlp ~]# podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 760f74cf9b86 registry.fedoraproject.org/fedora:latest /bin/bash 15 seconds ago Up 16 seconds awesome_dijkstra # attach to container session [root@dlp ~]# podman exec -it 760f74cf9b86 /bin/bash [root@760f74cf9b86 /]# # connected [root@760f74cf9b86 /]# exit
# stop container process [root@dlp ~]# podman kill 760f74cf9b86 [root@dlp ~]# podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
Sponsored Link |
|