10.4. Satellite サブスクリプションを使用したビルドの実行
10.4.1. Satellite 設定のビルドへの追加 リンクのコピーリンクがクリップボードにコピーされました!
Satellite を使用してコンテンツをインストールするビルドは、Satellite リポジトリーからコンテンツを取得するための適切な設定を提供する必要があります。
前提条件
Satellite インスタンスからコンテンツをダウンロードするために、yum 互換リポジトリー設定ファイルを提供するか、またはこれを作成する必要があります。
手順
Satellite リポジトリーの設定ファイルを含む ConfigMap を作成します。
$ oc create configmap yum-repos-d --from-file /path/to/satellite.repoSatellite リポジトリー設定を BuildConfig に追加します。
source: configMaps: - configMap: name: yum-repos-d destinationDir: yum.repos.d
10.4.2. Satellite サブスクリプションを使用した Docker ビルド リンクのコピーリンクがクリップボードにコピーされました!
Docker ストラテジービルドは、Satellite リポジトリーを使用してサブスクリプションコンテンツをインストールできます。
前提条件
エンタイトルメントキーと Satellite リポジトリー設定がビルド入力として追加される必要があります。
手順
たとえば、Dockerfile を使用して、 Satellite を使用してコンテンツをインストールします。
FROM registry.redhat.io/rhel7:latest
USER root
# Copy entitlements
COPY ./etc-pki-entitlement /etc/pki/entitlement
# Copy repository configuration
COPY ./yum.repos.d /etc/yum.repos.d
# Delete /etc/rhsm-host to use entitlements from the build container
RUN rm /etc/rhsm-host && \
# yum repository info provided by Satellite
yum -y update && \
yum -y install <rpms> && \
# Remove entitlements
rm -rf /etc/pki/entitlement
# OpenShift requires images to run as non-root by default
USER 1001
ENTRYPOINT ["/bin/bash"]