Hyunsun Moon | 3386a85 | 2019-07-26 14:56:11 -0600 | [diff] [blame^] | 1 | # |
| 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 | |
| 16 | FROM ubuntu:16.04 AS base-builder |
| 17 | RUN 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/* |
| 25 | RUN git clone https://gitlab.eurecom.fr/oai/openairinterface5g/ /openairinterface5g |
| 26 | WORKDIR /openairinterface5g |
| 27 | ENV USER=root |
| 28 | RUN git checkout -f v1.0.0 && \ |
| 29 | /bin/bash -c "source oaienv" && \ |
| 30 | cd cmake_targets && \ |
| 31 | ./build_oai -I |
| 32 | |
| 33 | FROM base-builder AS enb-builder |
| 34 | WORKDIR /openairinterface5g |
| 35 | ENV USER=root |
| 36 | RUN /bin/bash -c "source oaienv" && \ |
| 37 | cd cmake_targets && \ |
| 38 | ./build_oai --eNB -t ETHERNET -c |
| 39 | |
| 40 | FROM ubuntu:16.04 AS lte-softmodem |
| 41 | RUN 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/* |
| 53 | WORKDIR /openairinterface5g/cmake_targets |
| 54 | COPY --from=enb-builder /openairinterface5g/cmake_targets/ . |
| 55 | |
| 56 | FROM base-builder AS ue-builder |
| 57 | WORKDIR /openairinterface5g |
| 58 | ENV USER=root |
| 59 | RUN /bin/bash -c "source oaienv" && \ |
| 60 | cd cmake_targets && \ |
| 61 | ./build_oai --UE -t ETHERNET -c |
| 62 | |
| 63 | FROM ubuntu:16.04 AS lte-uesoftmodem |
| 64 | RUN 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/* |
| 78 | WORKDIR /openairinterface5g/cmake_targets |
| 79 | COPY --from=ue-builder /openairinterface5g/cmake_targets . |
| 80 | COPY --from=ue-builder /openairinterface5g/targets/bin/nvram . |
| 81 | COPY --from=ue-builder /openairinterface5g/targets/bin/usim . |
| 82 | COPY --from=ue-builder /openairinterface5g/targets ../targets |