소스 검색

finally nailed ocp entitled builds

Grega Bremec 2 년 전
부모
커밋
fd37ffaed3
2개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 1
      images/Containerfile-psacct
  2. 4 1
      images/Containerfile-sysstat

+ 4 - 1
images/Containerfile-psacct

@@ -4,7 +4,10 @@ USER 0
 
 COPY entrypoint-psacct.sh /usr/local/bin/entrypoint.sh
 
-RUN microdnf -y install psacct && \
+# This still applies: delete host RHSM data in OpenShift
+# Twist: if there is no host entitlement, remove host RHSM data.
+RUN [ -d /etc/pki/entitlement-host ] || rm -f /etc/rhsm-host ; \
+    microdnf -y install psacct && \
     rm -rf /var/lib/dnf /var/cache/dnf /var/cache/cups /var/cache/PackageKit && \
     chmod 755 /usr/local/bin/entrypoint.sh
 

+ 4 - 1
images/Containerfile-sysstat

@@ -4,7 +4,10 @@ USER 0
 
 COPY entrypoint-sysstat.sh /usr/local/bin/entrypoint.sh
 
-RUN microdnf -y install sysstat && \
+# This still applies: delete host RHSM data in OpenShift
+# Twist: if there is no host entitlement, remove host RHSM data.
+RUN [ -d /etc/pki/entitlement-host ] || rm -f /etc/rhsm-host ; \
+    microdnf -y install sysstat && \
     rm -rf /var/lib/dnf /var/cache/dnf /var/cache/cups /var/cache/PackageKit && \
     chmod 755 /usr/local/bin/entrypoint.sh