상세 컨텐츠

본문 제목

10.컨테이너 관리 - 컨테이너 이미지 검색 / 검사

엔지니어일기/RHCSA준비

by jaws99 2022. 10. 25. 23:51

본문

반응형

컨테이너 관리

# 컨테이너 관리 도구 podman 설치
yum -y install podman

 

컨테이너 이미지 검색

# search만 사용한다면 엄청 많은 결과가 나옵니다.
$ podman search httpd
NAME                                                                         DESCRIPTION
registry.access.redhat.com/rhscl/httpd-24-rhel7                              Apache HTTP 2.4 Server
registry.access.redhat.com/ubi8/httpd-24                                     Platform for running Apache httpd 2.4 or bui...
registry.access.redhat.com/cloudforms46-beta/cfme-openshift-httpd            CloudForms is a management and automation pl...
...

# limit 옵션으로 레지스트리 별 결과값 제한.
$ podman search --limit 2 httpd
NAME                                             DESCRIPTION
registry.access.redhat.com/rhscl/httpd-24-rhel7  Apache HTTP 2.4 Server
registry.access.redhat.com/ubi8/httpd-24         Platform for running Apache httpd 2.4 or bui...
registry.redhat.io/rhscl/httpd-24-rhel7          Apache HTTP 2.4 Server
registry.redhat.io/rhel8/httpd-24                Apache HTTP Server 2.4 available as containe...
docker.io/library/httpd                          The Apache HTTP Server Project
docker.io/clearlinux/httpd                       httpd HyperText Transfer Protocol (HTTP) ser...

# docker.io 레지스트리에서만 찾고 싶다면?
$ podman search --limit 2 docker.io/httpd
NAME                        DESCRIPTION
docker.io/library/httpd     The Apache HTTP Server Project
docker.io/clearlinux/httpd  httpd HyperText Transfer Protocol (HTTP) ser...

# 사용 가능한 태그들을 확인
$ podman search --list-tags docker.io/library/httpd --limit 4
NAME                     TAG
docker.io/library/httpd  2
docker.io/library/httpd  2-alpine
docker.io/library/httpd  2-alpine3.13
docker.io/library/httpd  2-alpine3.14

 

컨테이너 이미지를 로컬로 가져오기.

# podman image pull
$ podman pull docker.io/library/httpd
Trying to pull docker.io/library/httpd:latest...
Getting image source signatures
Copying blob e9995326b091 done
Copying blob e559e5380898 done
Copying blob ee55ccd48c8f done
Copying blob bc66ebea7efe done
Copying blob 5d0f831d3c0b done
Copying config fe8735c23e done
Writing manifest to image destination
Storing signatures
fe8735c23ec5da867dea9f7e69a1d120c12329f32b8a45710ff1a873a1e456ad

 

컨테이너 이미지 검사.

# inspect로 이미지 검사
$ podman inspect docker.io/library/httpd:latest
[
     {
          "Id": "fe8735c23ec5da867dea9f7e69a1d120c12329f32b8a45710ff1a873a1e456ad",
          "Digest": "sha256:5fa96551b61359de5dfb7fd8c9e97e4153232eb520a8e883e2f47fc80dbfc33e",
          "RepoTags": [
               "docker.io/library/httpd:latest"
........

 

컨테이너 이미지의 태그 수정

$ podman images
REPOSITORY               TAG         IMAGE ID      CREATED     SIZE
docker.io/library/nginx  latest      76c69feac34e  8 days ago  146 MB
docker.io/library/httpd  latest      fe8735c23ec5  8 days ago  150 MB

$ podman tag 76c69feac34e rhcsa/nginx:2020

$ podman images
REPOSITORY               TAG         IMAGE ID      CREATED     SIZE
docker.io/library/nginx  latest      76c69feac34e  8 days ago  146 MB
localhost/rhcsa/nginx    2020        76c69feac34e  8 days ago  146 MB
docker.io/library/httpd  latest      fe8735c23ec5  8 days ago  150 MB
반응형

관련글 더보기