Podman : Install2021/08/28 |
Install Podman that is Container management tool.
It's possible to use the same ease of use of Docker Cli and also Podman does not need specific Service Daemon. |
|
[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 4c25b3090c26 done Copying config fe3c5de034 done Writing manifest to image destination Storing signatures fe3c5de03486f6e68639071e35675bc204558725a728e4eb835a23b62db6d7b5 # 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@95bb9e0bb0b3:/# podman run -it debian /bin/bash root@95bb9e0bb0b3:/# # connected
uname -a Linux 95bb9e0bb0b3 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux root@95bb9e0bb0b3:/# 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 e170d5efeba7cd5345edcaf2a587f316082fe9fc7fc5ee05fa175bb952ebd450 # show podman proceses root@dlp:~# podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES e170d5efeba7 docker.io/library/debian:latest /bin/bash 7 seconds ago Up 7 seconds ago friendly_rosalind # attach to container session root@dlp:~# podman exec -it e170d5efeba7 /bin/bash root@e170d5efeba7:/# # connected root@e170d5efeba7:/# exit
# stop container process (if force stop, specify [kill]) root@dlp:~# podman stop e170d5efeba7 root@dlp:~# podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
Sponsored Link |