Commit 58d6f744 authored by sagar arora's avatar sagar arora

fix(ci): adapt rhel dockerfile for openshift build

Signed-off-by: sagar arora's avatarSagar Arora <sagar.arora@eurecom.fr>
parent be45ad9e
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
---
kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
name: "oai-amf"
namespace: oaicicd-core
spec:
runPolicy: "Serial"
source:
type: "Binary"
secrets:
- secret:
name: etc-pki-entitlement
destinationDir: etc-pki-entitlement
configMaps:
- configMap:
name: rhsm-conf
destinationDir: rhsm-conf
- configMap:
name: rhsm-ca
destinationDir: rhsm-ca
strategy:
dockerStrategy:
dockerfilePath: "docker/Dockerfile.amf.rhel8"
output:
to:
kind: "ImageStreamTag"
name: "oai-amf:develop"
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
name: oai-amf
namespace: oaicicd-core
spec:
lookupPolicy:
local: true
status:
tag: develop
......@@ -21,7 +21,7 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface AMF service
# Valid for RHEL 8.2
# Valid for UBI 8.6 | RHEL 8.6
#
#---------------------------------------------------------------------
......@@ -72,7 +72,10 @@ WORKDIR /openair-amf/build/scripts
RUN ldconfig && \
./build_amf --clean --Verbose --build-type Release --jobs && \
ldd /openair-amf/build/amf/build/amf && \
mv /openair-amf/build/amf/build/amf /openair-amf/build/amf/build/oai_amf
mv /openair-amf/build/amf/build/amf /openair-amf/build/amf/build/oai_amf && \
# Remove entitlements and Subscription Manager configs
rm -rf /etc/pki/entitlement && \
rm -rf /etc/rhsm
#---------------------------------------------------------------------
# TARGET IMAGE
......@@ -80,7 +83,16 @@ RUN ldconfig && \
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest as oai-amf
ENV TZ=Europe/Paris
# We install some debug tools for the moment in addition of mandatory libraries
RUN microdnf update -y && \
# Copy the entitlements
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 && \
microdnf update -y && \
microdnf install -y \
tzdata \
libasan \
......@@ -95,7 +107,10 @@ RUN microdnf update -y && \
mysql-libs \
libconfig && \
microdnf clean all -y && \
rm -rf /var/cache/yum /var/cache/dnf
rm -rf /var/cache/yum /var/cache/dnf && \
# Remove entitlements and Subscription Manager configs
rm -rf /etc/pki/entitlement && \
rm -rf /etc/rhsm
# Copying executable and generated libraries
WORKDIR /openair-amf/bin
......
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