Podman : Install2025/04/22 |
Install Podman that is Container management tool. |
|
[1] | Install Podman. |
root@dlp:~# apt -y install podman
|
[2] | Download an official image and create a Container and output the words [Welcome to the Podman World] inside the Container. |
# download the official image root@dlp:~# podman pull ubuntu Resolved "ubuntu" as an alias (/etc/containers/registries.conf.d/shortnames.conf) Trying to pull docker.io/library/ubuntu:latest... Getting image source signatures Copying blob 2726e237d1a3 done | Copying config 602eb6fb31 done | Writing manifest to image destination 602eb6fb314b5fafad376a32ab55194e535e533dec6552f82b70d7ac0e554b1c # run echo inside a container root@dlp:~# podman run ubuntu /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@3ac2880e9f01:/# podman run -it ubuntu /bin/bash root@3ac2880e9f01:/# # connected
uname -a Linux 3ac2880e9f01 6.14.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Sun Apr 6 15:05:05 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux root@3ac2880e9f01:/# 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 ubuntu /bin/bash 06aca0effbb5754927f6ec7705a3b26a5bc204e2e39c3ce61a698bb2e8d48f03 # show podman processes root@dlp:~# podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 06aca0effbb5 docker.io/library/ubuntu:latest /bin/bash 11 seconds ago Up 12 seconds romantic_hawking # attach to container session root@dlp:~# podman exec -it 06aca0effbb5 /bin/bash root@06aca0effbb5:/# # connected root@06aca0effbb5:/# exit
# stop container process # * if force stop, specify [podman kill ***] root@dlp:~# podman stop 06aca0effbb5 root@dlp:~# podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
Sponsored Link |
|