#/* # * 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 UDR service # Valid for Ubuntu-18.04 (bionic) # #--------------------------------------------------------------------- #--------------------------------------------------------------------- # BUILDER IMAGE #--------------------------------------------------------------------- FROM ubuntu:bionic as oai-udr-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" && \ git config --global https.postBuffer 123289600 && \ git config --global http.sslverify false # Copying source code WORKDIR /openair-udr COPY . /openair-udr # wait for it WORKDIR / RUN git clone https://github.com/vishnubob/wait-for-it.git # Installing and Building UDR WORKDIR /openair-udr/build/scripts RUN ./build_udr --install-deps --force RUN ./build_udr --clean --Verbose --build-type Release --jobs #--------------------------------------------------------------------- # TARGET IMAGE #--------------------------------------------------------------------- FROM ubuntu:bionic as oai-udr 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 \ iputils-ping \ tzdata \ bc \ tshark \ libmysqlclient20 \ libasan4 \ libpsl5 \ librtmp1 \ libldap-2.4-2 \ libnettle6 \ libnghttp2-14 \ libhogweed4 \ libconfig++9v5 && \ rm -rf /var/lib/apt/lists/* # Copying executable and generated libraries WORKDIR /openair-udr/bin COPY --from=oai-udr-builder /openair-udr/build/udr/build/udr oai_udr COPY --from=oai-udr-builder /openair-udr/scripts/entrypoint.sh . COPY --from=oai-udr-builder /wait-for-it/wait-for-it.sh . COPY --from=oai-udr-builder /usr/local/lib/libpistache.so /usr/local/lib/ RUN ldconfig WORKDIR /openair-udr/etc COPY --from=oai-udr-builder /openair-udr/etc/udr.conf . WORKDIR /openair-udr EXPOSE 80/tcp ENTRYPOINT ["/bin/bash","/openair-udr/bin/entrypoint.sh"] CMD ["/openair-udr/bin/oai_udr", "-c" , "/openair-udr/etc/udr.conf", "-o"]