20.5. 프라이빗 레지스트리로 컨테이너 푸시

buildah push 명령을 사용하여 로컬 스토리지에서 퍼블릭 또는 프라이빗 리포지토리로 이미지를 내보냅니다.

사전 요구 사항

절차

  1. 머신에 로컬 레지스트리를 생성합니다.

    # podman run -d -p 5000:5000 registry:2
  2. myecho:latest 이미지를 localhost 레지스트리로 푸시합니다.

    #  buildah push --tls-verify=false myecho:latest localhost:5000/myecho:latest
    Getting image source signatures
    Copying blob sha256:e4efd0...
    ...
    Writing manifest to image destination
    Storing signatures

검증

  1. localhost 리포지토리의 모든 이미지를 나열합니다.

    # curl http://localhost:5000/v2/_catalog
    {"repositories":["myecho2]}
    
    
    # curl http://localhost:5000/v2/myecho2/tags/list
    {"name":"myecho","tags":["latest"]}
  2. docker://localhost:5000/myecho:latest 이미지를 검사합니다.

    # skopeo inspect --tls-verify=false docker://localhost:5000/myecho:latest | less
    {
        "Name": "localhost:5000/myecho",
        "Digest": "sha256:8999ff6050...",
        "RepoTags": [
            "latest"
        ],
        "Created": "2021-06-28T14:44:05.919583964Z",
        "DockerVersion": "",
        "Labels": {
            "architecture": "x86_64",
            "authoritative-source-url": "registry.redhat.io",
        ...
    }
  3. localhost:5000/myecho 이미지를 가져옵니다.

    # podman pull --tls-verify=false localhost:5000/myecho2
    # podman run localhost:5000/myecho2
    This container works!

추가 리소스

  • buildah-push 도움말 페이지