Fedora 33
Sponsored Link

Podman : Install2020/11/06

 
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 registry.fedoraproject.org/fedora...
Getting image source signatures
...
...
Writing manifest to image destination
Storing signatures
79fd58dc76113dac76a120f22cadecc3b2d1794b414f90ea368cf66096700053

# 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 ~]#
podman run -it fedora /bin/bash

[root@553e113b6f53 /]#    
# connected
[root@553e113b6f53 /]#
uname -a

Linux 553e113b6f53 5.8.15-301.fc33.x86_64 #1 SMP Thu Oct 15 16:58:06 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@553e113b6f53 /]#
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

caa8cf45a110db8cc29dfbd6a658afa2d30f1cb1daed171d007eb86ee11018fd

# show podman proceses

[root@dlp ~]#
podman ps

CONTAINER ID  IMAGE                                     COMMAND    CREATED        STATUS            PORTS   NAMES
caa8cf45a110  registry.fedoraproject.org/fedora:latest  /bin/bash  8 seconds ago  Up 8 seconds ago          ecstatic_sutherland

# attach to container session

[root@dlp ~]#
podman exec -it caa8cf45a110 /bin/bash

[root@caa8cf45a110 /]#    
# connected

[root@caa8cf45a110 /]#
exit
# stop container process (if force stop, specify [kill])

[root@dlp ~]#
podman stop caa8cf45a110

[root@dlp ~]#
podman ps

CONTAINER ID  IMAGE  COMMAND  CREATED  STATUS  PORTS  NAMES
Matched Content