2.5. bootc イメージのバージョンのオーバーライド


Red Hat Enterprise Linux (RHEL) のベースイメージ、Universal Base Images (UBI)、および rhel-bootc は、主要なオペレーティングシステムバージョンのみを追跡するバージョン番号を使用します。派生イメージに対して特定のバージョン番号を定義するには、Containerfile に version ラベルを追加することで、この値をオーバーライドできます。

前提条件

  • container-tools メタパッケージがインストールされている。

手順

  1. Containerfile を作成します。

    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”
  2. 現在のディレクトリーの Containerfile を使用して <image> イメージをビルドします。

    $ podman build -t quay.io/<namespace>/<image>:<tag> .

検証

  • オーバーライドが適用されたことを確認します。

    $ podman inspect <image-name> --format '{{index .Labels "org.opencontainers.image.version"}}'
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る