Dockerfile.udr.ubuntu18 3.63 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
#/*
# * 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

53
54
55
56
# wait for it
WORKDIR /
RUN git clone https://github.com/vishnubob/wait-for-it.git

57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# 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 \
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
74
      iputils-ping \
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
      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 .
93
COPY --from=oai-udr-builder /wait-for-it/wait-for-it.sh .
94
95
96
97
98
99
100
101
102
103
104
105
106

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"]