2.10.4.2. Red Hat Satellite 서브스크립션을 사용하는 Docker 빌드
This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.
2.10.4.2. Red Hat Satellite 서브스크립션을 사용하는 Docker 빌드
Docker 전략 빌드에서는 Red Hat 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 sed -i".org" -e "s#^enabled=1#enabled=0#g" /etc/yum/pluginconf.d/subscription-manager.conf
#RUN cat /etc/yum/pluginconf.d/subscription-manager.conf
RUN yum clean all
#RUN yum-config-manager
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"]
FROM registry.redhat.io/rhel7:latest
USER root
#Copy entitlementsCOPY ./etc-pki-entitlement /etc/pki/entitlement
#Copy repository configurationCOPY ./yum.repos.d /etc/yum.repos.d
#Delete /etc/rhsm-host to use entitlements from the build containerRUN sed -i".org" -e "s#^enabled=1#enabled=0#g" /etc/yum/pluginconf.d/subscription-manager.conf
1
#RUN cat /etc/yum/pluginconf.d/subscription-manager.conf
RUN yum clean all
#RUN yum-config-manager
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 defaultUSER 1001
ENTRYPOINT ["/bin/bash"]
Copy to ClipboardCopied!Toggle word wrapToggle overflow
enabled=1을 사용하여 빌드에 Satellite 구성을 추가하는 데 실패하면 Dockerfile에 RUN sed -i".org" -e "s#^enabled=1#enabled=0#g" /etc/yum/pluginconf.d/subscription-manager.conf를 추가합니다.