Podman : Install2019/11/19 |
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 ~]# dnf -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 official image [root@dlp ~]# podman pull fedora Trying to pull docker.io/library/fedora... Getting image source signatures Copying blob d318c91bf2a8 done Copying config f0858ad3fe done Writing manifest to image destination Storing signatures f0858ad3febdf45bb2e5501cb459affffacef081f79eaa436085c3b6d9bd46ca # run echo inside 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@4da68524fc03 /]# podman run -it fedora /bin/bash [root@4da68524fc03 /]# # connected
uname -a Linux 4da68524fc03 5.3.7-301.fc31.x86_64 #1 SMP Mon Oct 21 19:18:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux [root@4da68524fc03 /]# 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 dda0912d81736b8cdea493bb55b4749c03170500931f7852799a6c017d9d5eec # show podman proceses [root@dlp ~]# podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES dda0912d8173 docker.io/library/fedora:latest /bin/bash 10 seconds ago Up 10 seconds ago gallant_brown # attach to container session [root@dlp ~]# podman exec -it dda0912d8173 /bin/bash [root@dda0912d8173 /]# # connected [root@dda0912d8173 /]# exit
# stop container process (if force stop, specify [kill]) [root@dlp ~]# podman stop dda0912d8173 [root@dlp ~]# podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
Sponsored Link |