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"]