Dockerfile.eNB.rhel7.oc4-4 2.85 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#/*
# * 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
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
#   Valid for RHEL7 in the OpenShift context (v4.4)
#
#---------------------------------------------------------------------

28
FROM image-registry.openshift-image-registry.svc:5000/oai/oai-ran:latest AS enb-build 
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83


WORKDIR /oai-enb
COPY . .

#run build_oai to build the target image
RUN /bin/sh oaienv && \ 
    cd cmake_targets && \
    mkdir -p log && \
    ./build_oai --eNB  


#start from scratch for target executable
FROM registry.access.redhat.com/ubi7/ubi:latest as oai-enb

# Entitlements and RHSM configurations are Open-Shift Secret and ConfigMaps
# It is pre-requisite
RUN rm -Rf /etc/rhsm/ca /etc/pki/entitlement
# 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


#install developers pkg/repo
RUN rm /etc/rhsm-host && \
    # Initialize /etc/yum.repos.d/redhat.repo
    # See https://access.redhat.com/solutions/1443553
    yum repolist --disablerepo=* && \
    yum-config-manager --enable rhel-7-server-optional-rpms rhel-server-rhscl-7-rpms && \
    yum update -y && \
    yum install -y  \
        lksctp-tools \
        protobuf-c \
        nettle \
        libyaml && \
    echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf


WORKDIR /opt/oai-enb/bin
COPY --from=enb-build /oai-enb/targets/bin/lte-softmodem.Rel15 .

RUN ldd lte-softmodem.Rel15

#EXPOSE 2152/udp  # S1U, GTP/UDP
#EXPOSE 22100/tcp # ?
#EXPOSE 36412/udp # S1C, SCTP/UDP
#EXPOSE 36422/udp # X2C, SCTP/UDP
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)

#CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"]
#ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"]