본문으로 바로가기

[Linux] RHCSA container

category Linux 2020. 12. 10. 23:24
728x90

패키지 설치

[root@JeongYD01 mini]# yum install -y podman

[root@JeongYD01 mini]# yum module install -y container-tools

 

 

[root@JeongYD01 mini]# podman serch httpd

[root@JeongYD01 mini]# podman pull docker.io/appertly/httpd

[root@JeongYD01 mini]# podman images
REPOSITORY                TAG     IMAGE ID      CREATED      SIZE
docker.io/library/httpd   latest  0a30f4c29d25  3 weeks ago  142 MB
docker.io/appertly/httpd  latest  e8154ea9b12a  2 years ago  190 MB

 

 

[root@JeongYD01 mini]# podman run -d -t -p 8080:80/tcp docker.io/library/httpd
fbd1cad3340d53396d957c73cb12ae14868f11407ca503f596203ff9f653e266

 

참고 자료

access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/building_running_and_managing_containers/working-with-container-images_building-running-and-managing-containers

 

Chapter 2. Working with container images Red Hat Enterprise Linux 8 | Red Hat Customer Portal

The Red Hat Customer Portal delivers the knowledge, expertise, and guidance available through your Red Hat subscription.

access.redhat.com

아래는 redhat.com 사이트 내용입니다.

# podman pull registry.redhat.io/rhel8/rsyslog

# podman inspect registry.redhat.io/rhel8/rsyslog

 

# podman run -d registry.redhat.io/rhel8/rsyslog
# podman ps
CONTAINER ID IMAGE             COMMAND         CREATED        STATUS      PORTS NAMES
1cc92aea398d ...rsyslog:latest /bin/rsyslog.sh 37 minutes ago Up 1 day ago      myrsyslog
# podman mount 1cc92aea398d
/var/lib/containers/storage/overlay/65881e78.../merged

# ls /var/lib/containers/storage/overlay/65881e78*/merged
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var

 

# podman save -o myrsyslog.tar registry.redhat.io/rhel8/rsyslog:latest
# file myrsyslog.tar
myrsyslog.tar: POSIX tar archive

 

# podman load -i myrsyslog.tar
# podman images
REPOSITORY                       TAG    IMAGE ID      CREATED     SIZE
registry.redhat.io/rhel8/rsyslog latest 1f5313131bf0  7 weeks ago 235 MB