[RHEL8] skopeo를 이용한 harbor registry에 이미지 복사

2021. 11. 26. 16:51·Linux
728x90
반응형

skopeo를 통한 registry간 컨테이너 이미지 복사 (이동)에 대한 방법을 정리하였습니다.

방법은 외부 RedHat에 있는 특정 이미지를 제가 생성한 harbor registry에 이미지를 복사하는 방법입니다.

간략하게 skopeo는 컨테이너 이미지를 검사, 서명 및 이동하기 위한 포괄적인 툴이며, 고도화된 컨테이너 공유 툴인 Skopeo를 사용하여 다음을 수행할 수 있습니다.
• 이미지 매니페스트의 검사, 검증 및 서명
• 레지스트리 간 컨테이너 이미지 이동

 

 

1. Project 생성

테스트를 위해 skopeo라는 프로젝트를 생성합니다.

 

 

 

 

2. RedHat Registry에 접속

[root@rhocp-registry harbor]# docker login registry.access.redhat.com
Username: xxxx
Password: xxxx
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

 

 

3. skopeo 툴을 활용하여 레지스트리간 이미지 복사 (이동)

[root@rhocp-registry harbor]# skopeo copy docker://registry.access.redhat.com/ubi8/ubi-minimal docker://55.55.31.12:8080/skopeo/ubi-minimal
Getting image source signatures
Checking if image destination supports signatures
Copying blob 4418ace46c3d skipped: already exists
Copying blob 2a99c93da168 [--------------------------------------] 0.0b / 0.0b
Copying config cc54f67dc3 [======================================] 4.2KiB / 4.2KiB
Writing manifest to image destination
Storing signatures

 

 

4. skopeo 프로젝트에 정상적으로 이미지가 추가 되어있는지 확인

 

 

5. 이미지를 내부 디렉토리로 복사하는 방법

registry간 복사도 되지만, 디렉토리로도 다운 받을 수 있어 방법을 공유합니다.

[root@rhocp-registry ~]# mkdir docker_image

[root@rhocp-registry ~]# skopeo copy docker://registry.access.redhat.com/rhel7:latest dir:/root/docker_images/rhel7
Getting image source signatures
Checking if image destination supports signatures
Copying blob 250c7c6b4908 done
Copying blob 1f02689216d2 done
Copying config d5664254a0 done
Writing manifest to image destination
Storing signatures

[root@rhocp-registry ~]# cd docker_images/rhel7/

[root@rhocp-registry rhel7]# ls
1f02689216d239aabad25f30f45d770c156a4928b62398f2889c8a0f8792e70c  d5664254a0f31a2f28b8a7e426f74000c46520fcbba9e6f39a0b8bb7a775e7e5  signature-1  signature-3  signature-5  version
250c7c6b49086160d4b251bce8841be3dd335248f4fb2aec9a079ba329273458  manifest.json                                                     signature-2  signature-4  signature-6

 

 

 

728x90
반응형

'Linux' 카테고리의 다른 글

[Linux] tldr 설치 및 사용방법 (단순화된 man)  (0) 2022.01.04
[RHEL7/8] ctrl-alt-del 비활성화  (0) 2021.12.21
[RHEL8] Harbor 구성방법 및 사용법  (0) 2021.11.26
[RHEL8] Harbor (Container Image Registry) 설치  (1) 2021.11.24
[Linux] 디렉토리(폴더) 별 디스크 사용량 확인  (0) 2021.11.19
'Linux' 카테고리의 다른 글
  • [Linux] tldr 설치 및 사용방법 (단순화된 man)
  • [RHEL7/8] ctrl-alt-del 비활성화
  • [RHEL8] Harbor 구성방법 및 사용법
  • [RHEL8] Harbor (Container Image Registry) 설치
레시피 마스터
레시피 마스터
클라우드 환경에서 OS, 자동화, 컴퓨팅등 알고 있는 지식으로 공유하는데 활용
  • 레시피 마스터
    클라우드 구축 레시피
    레시피 마스터
  • 전체
    오늘
    어제
    • 분류 전체보기 (66) N
      • Linux (15)
      • Virtualization (2)
      • OpenStack (2)
      • Container (13)
      • Monitoring (1)
      • Infra as Code (IaC) (0)
      • 서버_OS (13) N
      • 가상화 (3) N
      • 클라우드 컴퓨팅 (5) N
      • 컨테이너 플랫폼 (3)
      • 자동화 (2) N
      • 데이터베이스 (2)
      • 모니터링 (5) N
  • 블로그 메뉴

    • 홈
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    linuxbackup
    rhel
    리눅스 모니터링 시스템 구축
    linux 백업 복구 rear
    ansible-vault encrypt decrypt
    ansible 파일 암호화
    rear backup and restore
    리눅스 마이그레이션
    node exporter 구성
    prometheus 설치 방법
    ansible암호화
    prometheus node_exporter 연동
    relax and recover 사용법
    yaml보안
    ansible vault 사용법
  • 최근 댓글

  • 최근 글

  • 반응형
  • hELLO· Designed By정상우.v4.10.3
레시피 마스터
[RHEL8] skopeo를 이용한 harbor registry에 이미지 복사
상단으로

티스토리툴바