Dockerfile.ausf.ubuntu18 3.48 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 28 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 84 85 86 87 88 89 90 91 92 93 94 95
#/*
# * 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 AUSF service
#   Valid for Ubuntu-18.04 (bionic)
#
#---------------------------------------------------------------------

#---------------------------------------------------------------------
# BUILDER IMAGE
#---------------------------------------------------------------------
FROM ubuntu:bionic as oai-ausf-builder

ARG NEEDED_GIT_PROXY

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && DEBIAN_FRONTEND=noninteractive apt-get install --yes \
    psmisc \
    git \
  && rm -rf /var/lib/apt/lists/*

# Some GIT configuration command quite useful
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
RUN git config --global https.postBuffer 123289600 && \
    git config --global http.sslverify false

# Copying source code
WORKDIR /openair-ausf
COPY . /openair-ausf

# Installing and Building AUSF
WORKDIR /openair-ausf/build/scripts
RUN ./build_ausf --install-deps --force
RUN ./build_ausf --clean --Verbose --build-type Release --jobs

#---------------------------------------------------------------------
# TARGET IMAGE
#---------------------------------------------------------------------
FROM ubuntu:bionic as oai-ausf
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
# We install some debug tools for the moment in addition of mandatory libraries
RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
    DEBIAN_FRONTEND=noninteractive apt-get install --yes \
      psmisc \
      net-tools \
      tzdata \
      bc \
      tshark \
      libasan4 \
      libnghttp2-14 \
      libhogweed4 \
      libconfig++9v5 \
      libcurl4-gnutls-dev \
  && rm -rf /var/lib/apt/lists/*

# Copying executable and generated libraries
WORKDIR /openair-ausf/bin
COPY --from=oai-ausf-builder /openair-ausf/build/ausf/build/ausf oai_ausf
COPY --from=oai-ausf-builder /openair-ausf/scripts/entrypoint.sh .

COPY --from=oai-ausf-builder /usr/local/lib/libpistache.so /usr/local/lib/
COPY --from=oai-ausf-builder /usr/lib/x86_64-linux-gnu/libnettle.so.6 /usr/local/lib/

RUN ldconfig

WORKDIR /openair-ausf/etc
COPY --from=oai-ausf-builder /openair-ausf/etc/ausf.conf .

WORKDIR /openair-ausf

ENTRYPOINT ["/bin/bash","/openair-ausf/bin/entrypoint.sh"]

CMD ["/openair-ausf/bin/oai_ausf", "-c" , "/openair-ausf/etc/ausf.conf", "-o"]