Podman : Install2023/06/21 |
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 debian Resolved "debian" as an alias (/etc/containers/registries.conf.d/shortnames.conf) Trying to pull docker.io/library/debian:latest... Getting image source signatures Copying blob bba7bb10d5ba done Copying config 49081a1edb done Writing manifest to image destination Storing signatures 49081a1edb0b55df1967387e4c234add2d3f8ef0dc1f4953e7eaf552dc761c5a # run echo inside a container root@dlp:~# podman run debian /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@5c8e3406597c:/# podman run -it debian /bin/bash root@5c8e3406597c:/# # connected
uname -a Linux 5c8e3406597c 6.1.0-9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2023-05-08) x86_64 GNU/Linux root@5c8e3406597c:/# 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 debian /bin/bash 26652f4918eb615f5c4e4466bd7dc91bed381330e52ebdd880cdbe05b0c101b5 # show podman processes root@dlp:~# podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 26652f4918eb docker.io/library/debian:latest /bin/bash 23 seconds ago Up 24 seconds ago epic_wescoff # attach to container session root@dlp:~# podman exec -it 26652f4918eb /bin/bash root@26652f4918eb:/# # connected root@26652f4918eb:/# exit
# stop container process # * if force stop, specify [podman kill ***] root@dlp:~# podman stop 26652f4918eb root@dlp:~# podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
Sponsored Link |