blob: 4e91942ade4aed5725145755c63b55cd83a50392 [file] [log] [blame]
Hyunsun Moon3386a852019-07-26 14:56:11 -06001#
2# Copyright 2019-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16FROM ubuntu:16.04 AS base-builder
17RUN apt-get update && apt-get install -y \
18 sudo \
19 linux-headers-`uname -r` \
20 vim-common \
21 git \
22 build-essential \
23 cmake \
24 && rm -rf /var/lib/apt/lists/*
25RUN git clone https://gitlab.eurecom.fr/oai/openairinterface5g/ /openairinterface5g
26WORKDIR /openairinterface5g
27ENV USER=root
28RUN git checkout -f v1.0.0 && \
29 /bin/bash -c "source oaienv" && \
30 cd cmake_targets && \
31 ./build_oai -I
32
33FROM base-builder AS enb-builder
34WORKDIR /openairinterface5g
35ENV USER=root
36RUN /bin/bash -c "source oaienv" && \
37 cd cmake_targets && \
38 ./build_oai --eNB -t ETHERNET -c
39
40FROM ubuntu:16.04 AS lte-softmodem
41RUN apt-get update && apt-get install -y \
42 libssl1.0.0 \
43 libnettle6 \
44 libsctp1 \
45 libforms2 \
46 libprotobuf-c1 \
47 libyaml-0-2 \
48 libconfig9 \
49 dnsutils \
50 iproute2 \
51 iputils-ping \
52 && rm -rf /var/lib/apt/lists/*
53WORKDIR /openairinterface5g/cmake_targets
54COPY --from=enb-builder /openairinterface5g/cmake_targets/ .
55
56FROM base-builder AS ue-builder
57WORKDIR /openairinterface5g
58ENV USER=root
59RUN /bin/bash -c "source oaienv" && \
60 cd cmake_targets && \
61 ./build_oai --UE -t ETHERNET -c
62
63FROM ubuntu:16.04 AS lte-uesoftmodem
64RUN apt-get update && apt-get install -y \
65 libssl1.0.0 \
66 libnettle6 \
67 libsctp1 \
68 libforms2 \
69 libconfig9 \
70 libblas3 \
71 liblapacke \
72 sudo \
73 dnsutils \
74 iproute2 \
75 iputils-ping \
76 net-tools \
77 && rm -rf /var/lib/apt/lists/*
78WORKDIR /openairinterface5g/cmake_targets
79COPY --from=ue-builder /openairinterface5g/cmake_targets .
80COPY --from=ue-builder /openairinterface5g/targets/bin/nvram .
81COPY --from=ue-builder /openairinterface5g/targets/bin/usim .
82COPY --from=ue-builder /openairinterface5g/targets ../targets