2.5. bootc 이미지 버전 덮어쓰기
RHEL(Red Hat Enterprise Linux) 기본 이미지, UBI(Universal Base Images) 및 rhel-bootc 는 주요 운영 체제 버전만 추적하는 버전 번호를 사용합니다. 파생 이미지에 대한 특정 버전 번호를 정의하려면 Containerfile에 version 레이블을 추가하여 이 값을 덮어쓸 수 있습니다.
사전 요구 사항
-
container-toolsmeta-package가 설치되어 있습니다.
프로세스
컨테이너 파일을 생성합니다.
FROM registry.redhat.io/rhel10/rhel-bootc:latest # In this example, the custom operating system has its own # version scheme. # The operating system major version is copied # and a sub-version of it is added, which represents a point-in-time # snapshot of the base OS content. # This just changes the output of bootc status. A deeper level # of customization is available by also changing the contents of /usr/lib/os-release. # Define the custom version and release metadata LABEL org.opencontainers.image.version=”10.1.1”현재 디렉터리의
을 사용하여 <image> 이미지를 빌드합니다.Containerfile$ podman build -t quay.io/<namespace>/<image>:<tag> .
검증
덮어쓰기가 적용되었는지 확인합니다.
$ podman inspect <image-name> --format '{{index .Labels "org.opencontainers.image.version"}}'