Fedora 32
Sponsored Link

Podman : Install2020/05/11

 
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
Copying blob 3088721d7dbf done
Copying config d81c91deec done
Writing manifest to image destination
Storing signatures
d81c91deec0dc09a3f05db3f538bdba9c49f1d51e6955078f274cd4ed4376c6f

# 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@ec1de31698f3 /]#    
# connected
[root@ec1de31698f3 /]#
uname -a

Linux ec1de31698f3 5.6.6-300.fc32.x86_64 #1 SMP Tue Apr 21 13:44:19 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@ec1de31698f3 /]#
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

f62f67dc69aae873a1f569358c5da5316e10af149506436bc963a1216c40b8dc

# show podman proceses

[root@dlp ~]#
podman ps

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

# attach to container session

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

[root@f62f67dc69aa /]#    
# connected

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

[root@dlp ~]#
podman stop f62f67dc69aa

[root@dlp ~]#
podman ps

CONTAINER ID  IMAGE  COMMAND  CREATED  STATUS  PORTS  NAMES
Matched Content