Commit d698c093 authored by Raphael Defosseux's avatar Raphael Defosseux

feat(docker): making the RHEL8 openshift-build-config-friendly

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 51ac716a
...@@ -197,9 +197,10 @@ pipeline { ...@@ -197,9 +197,10 @@ pipeline {
myShCmd('sudo podman image rm oai-upf-vpp:' + upf_tag + ' || true', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('sudo podman image rm oai-upf-vpp:' + upf_tag + ' || true', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo podman image prune --force', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('sudo podman image prune --force', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
// Copy the RHEL Host certificates for building // Copy the RHEL Host certificates for building
myShCmd('mkdir -p tmp/ca tmp/entitlement', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('mkdir -p ./etc-pki-entitlement ./rhsm-conf ./rhsm-ca', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('cp /etc/pki/entitlement/*pem tmp/entitlement', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('cp /etc/pki/entitlement/*pem ./etc-pki-entitlement', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo cp /etc/rhsm/ca/redhat-uep.pem tmp/ca', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('sudo cp /etc/rhsm/rhsm.conf ./rhsm-conf', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo cp /etc/rhsm/ca/*pem ./rhsm-ca', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo podman build --no-cache --target oai-upf-vpp --tag oai-upf-vpp:' + upf_tag + ' --file docker/Dockerfile.upf-vpp.rhel7 --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > archives/upf_podman_image_build.log 2>&1', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('sudo podman build --no-cache --target oai-upf-vpp --tag oai-upf-vpp:' + upf_tag + ' --file docker/Dockerfile.upf-vpp.rhel7 --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > archives/upf_podman_image_build.log 2>&1', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo podman image ls >> archives/upf_podman_image_build.log', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmd('sudo podman image ls >> archives/upf_podman_image_build.log', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
if ("MERGE".equals(env.gitlabActionType)) { if ("MERGE".equals(env.gitlabActionType)) {
......
...@@ -32,8 +32,12 @@ FROM registry.access.redhat.com/ubi7/ubi:latest AS vpp-upf-builder ...@@ -32,8 +32,12 @@ FROM registry.access.redhat.com/ubi7/ubi:latest AS vpp-upf-builder
ARG NEEDED_GIT_PROXY ARG NEEDED_GIT_PROXY
COPY tmp/ca/redhat-uep.pem /etc/rhsm/ca # Copy the entitlements
COPY tmp/entitlement/*.pem /etc/pki/entitlement COPY ./etc-pki-entitlement /etc/pki/entitlement
# Copy the subscription manager configurations
COPY ./rhsm-conf /etc/rhsm
COPY ./rhsm-ca /etc/rhsm/ca
RUN rm -f /etc/rhsm-host && \ RUN rm -f /etc/rhsm-host && \
subscription-manager repos --enable rhel-server-rhscl-7-rpms && \ subscription-manager repos --enable rhel-server-rhscl-7-rpms && \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment