7.10.2. 개인 레지스트리에 액세스하도록 bootc 구성


프라이빗 레지스트리에서 컨테이너 이미지를 가져오려면 bootc 워크플로우에 유효한 인증 자격 증명을 제공해야 합니다. 컨테이너 이미지에 포함된 일반적인 영구 파일에 bootc 및 Podman 인증 정보 경로를 심볼릭하면 환경 전체에서 시크릿을 가져오기 위해 단일 정보 소스를 유지 관리할 수 있습니다.

사전 요구 사항

  • Bootc 는 레지스트리에 대한 개인 액세스를 제공합니다.

프로세스

  1. /usr/lib/container-auth.json 레지스트리 인증 파일을 생성하고 다음 콘텐츠를 추가합니다.

    # Make /run/containers/0/auth.json (a transient runtime file)
    # a symlink to our /usr/lib/container-auth.json (a persistent file)
    # which is also symlinked from /etc/ostree/auth.json.
    d /run/containers/0 0755 root root -
    L /run/user/0/containers/auth.json - - - - ../../../../usr/lib/container-auth.json
  2. 동일한 디렉터리에 Containerfile을 생성합니다. 예를 들면 다음과 같습니다.

    # This example expects a secret named "creds" to contain
    # the registry pull secret.  To build, for example
    # podman build --secret id=creds,src=$HOME/.docker/config.json ...
    FROM quay.io/<namespace>/<image>:_<tag>_
    # Use a single pull secret for bootc and podman by symlinking both locations
    # to a common persistent file embedded in the container image.
    # We just make up /usr/lib/container-auth.json
    COPY containers-auth.conf /usr/lib/tmpfiles.d/link-podman-credentials.conf
    RUN --mount=type=secret,id=creds,required=true cp /run/secrets/creds /usr/lib/container-auth.json && \
        chmod 0600 /usr/lib/container-auth.json && \
        ln -sr /usr/lib/container-auth.json /etc/ostree/auth.json

    이러한 설정을 포함하면 특정 커널 옵션을 컨테이너 이미지에서 프로비저닝된 모든 시스템에 일관되게 적용할 수 있으므로 배포 후 구성이 필요하지 않습니다.

  3. container-auth.json 파일을 /etc/ostree/auth.json 에 배치하여 프라이빗 레지스트리 인증을 구성합니다.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동