From 00926c5b7d560ea475b656b1041fb6054f6d55c4 Mon Sep 17 00:00:00 2001
From: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Date: Sun, 4 Oct 2020 18:30:58 +0200
Subject: [PATCH] [DOCKER][Ubuntu18]: adding Ubuntu18 support

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
---
 docker/Dockerfile.eNB.ubuntu18   | 122 ++++++++++++++++++++++++++++++
 docker/Dockerfile.gNB.ubuntu18   | 124 +++++++++++++++++++++++++++++++
 docker/Dockerfile.lteUE.ubuntu18 | 121 ++++++++++++++++++++++++++++++
 docker/Dockerfile.nrUE.ubuntu18  | 117 +++++++++++++++++++++++++++++
 docker/Dockerfile.ran.ubuntu18   |  59 +++++++++++++++
 5 files changed, 543 insertions(+)
 create mode 100644 docker/Dockerfile.eNB.ubuntu18
 create mode 100644 docker/Dockerfile.gNB.ubuntu18
 create mode 100644 docker/Dockerfile.lteUE.ubuntu18
 create mode 100644 docker/Dockerfile.nrUE.ubuntu18
 create mode 100644 docker/Dockerfile.ran.ubuntu18

diff --git a/docker/Dockerfile.eNB.ubuntu18 b/docker/Dockerfile.eNB.ubuntu18
new file mode 100644
index 00000000000..334ac1b5f2d
--- /dev/null
+++ b/docker/Dockerfile.eNB.ubuntu18
@@ -0,0 +1,122 @@
+#/*
+# * 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 BUILD service
+#   Valid for Ubuntu 18.04
+#
+#---------------------------------------------------------------------
+
+FROM ran-build:latest AS enb-build 
+
+WORKDIR /oai-ran
+
+#run build_oai to build the target image
+RUN /bin/sh oaienv && \ 
+    cd cmake_targets && \
+    mkdir -p log && \
+    ./build_oai --eNB --ninja -w USRP
+
+# debug
+#RUN ldconfig -v && ldd /oai-ran/targets/bin/lte-softmodem.Rel15
+#RUN ls -ls /oai-ran/targets/bin
+#RUN ls -ls /oai-ran/cmake_targets/ran_build/build/*.so
+
+#start from scratch for target executable
+FROM ubuntu:bionic as oai-enb
+ENV DEBIAN_FRONTEND=noninteractive
+ENV TZ=Europe
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+RUN apt-get update && \
+    DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
+    DEBIAN_FRONTEND=noninteractive apt-get install --yes \
+        software-properties-common \
+        libsctp1 \
+        libnettle6 \
+        libblas3 \
+        libatlas3-base \
+        libconfig9 \
+        openssl \
+        net-tools \
+        iproute2 \
+        libyaml-0-2 && \
+    # Install UHD driver from ettus ppa 
+    # At time of writing, it is 3.14
+    add-apt-repository ppa:ettusresearch/uhd --yes && \
+    apt-get update && \
+    DEBIAN_FRONTEND=noninteractive apt-get install --yes \
+        python \
+        libusb-1.0-0 \
+        libuhd003 \
+        uhd-host && \
+    rm -rf /var/lib/apt/lists/*
+
+WORKDIR /opt/oai-enb/bin
+COPY --from=enb-build /oai-ran/targets/bin/lte-softmodem.Rel15 .
+
+WORKDIR /usr/local/lib/
+COPY --from=enb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
+COPY --from=enb-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
+COPY --from=enb-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
+COPY --from=enb-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
+COPY --from=enb-build /oai-ran/targets/bin/libcoding.so .
+COPY --from=enb-build /oai-ran/targets/bin/libparams_libconfig.so .
+COPY --from=enb-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
+COPY --from=enb-build /oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so .
+RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so"
+RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so"
+RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
+
+COPY --from=enb-build /usr/local/lib/libprotobuf-c.so.1 .
+
+RUN ldconfig
+
+#debug
+#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
+#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
+#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
+#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
+#RUN ldd /usr/local/lib/libcoding.so
+#RUN ldd /usr/local/lib/libparams_libconfig.so
+#RUN ldd /usr/local/lib/libdfts.so
+#RUN ldd /usr/local/lib/liboai_iqplayer.so
+#RUN ldd /opt/oai-enb/bin/lte-softmodem.Rel15
+
+# Copy the relevant configuration files for eNB
+WORKDIR /opt/oai-enb/etc
+COPY --from=enb-build /oai-ran/ci-scripts/conf_files/enb.* ./
+COPY --from=enb-build /oai-ran/ci-scripts/conf_files/rcc.* ./
+COPY --from=enb-build /oai-ran/ci-scripts/conf_files/cu.* ./
+COPY --from=enb-build /oai-ran/ci-scripts/conf_files/du.* ./
+COPY --from=enb-build /oai-ran/ci-scripts/conf_files/rru.* ./
+
+WORKDIR /opt/oai-enb
+
+#EXPOSE 2152/udp  # S1U, GTP/UDP
+#EXPOSE 22100/tcp # ?
+#EXPOSE 36412/udp # S1C, SCTP/UDP
+#EXPOSE 36422/udp # X2C, SCTP/UDP
+#EXPOSE 50000/udp # IF5 / ORI (control)
+#EXPOSE 50001/udp # IF5 / ECPRI (data)
+
+#CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"]
+#ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"]
diff --git a/docker/Dockerfile.gNB.ubuntu18 b/docker/Dockerfile.gNB.ubuntu18
new file mode 100644
index 00000000000..8481d49f9f0
--- /dev/null
+++ b/docker/Dockerfile.gNB.ubuntu18
@@ -0,0 +1,124 @@
+#/*
+# * 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 BUILD service
+#   Valid for Ubuntu18.04
+#
+#---------------------------------------------------------------------
+
+FROM ran-build:latest AS gnb-build 
+
+WORKDIR /oai-ran
+
+#run build_oai to build the target image
+RUN /bin/sh oaienv && \ 
+    cd cmake_targets && \
+    mkdir -p log && \
+    ./build_oai --gNB --ninja -w USRP
+
+#debug
+RUN ldconfig -v
+RUN ldd /oai-ran/targets/bin/nr-softmodem.Rel15
+RUN ls -lst /oai-ran/targets/bin
+RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
+
+#start from scratch for target executable
+FROM ubuntu:bionic as oai-gnb
+ENV DEBIAN_FRONTEND=noninteractive
+ENV TZ=Europe
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+RUN apt-get update && \
+    DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
+    DEBIAN_FRONTEND=noninteractive apt-get install --yes \
+        software-properties-common \
+        libsctp1 \
+        libnettle6 \
+        libblas3 \
+        libatlas3-base \
+        libconfig9 \
+        openssl \
+        net-tools \
+        iproute2 \
+        libyaml-0-2 && \
+    # Install UHD driver from ettus ppa 
+    # At time of writing, it is 3.14
+    add-apt-repository ppa:ettusresearch/uhd --yes && \
+    apt-get update && \
+    DEBIAN_FRONTEND=noninteractive apt-get install --yes \
+        python \
+        libusb-1.0-0 \
+        libuhd003 \
+        uhd-host && \
+    rm -rf /var/lib/apt/lists/*
+
+WORKDIR /opt/oai-gnb/bin
+COPY --from=gnb-build /oai-ran/targets/bin/nr-softmodem.Rel15 .
+
+WORKDIR /usr/local/lib/
+COPY --from=gnb-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
+COPY --from=gnb-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
+COPY --from=gnb-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
+COPY --from=gnb-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
+COPY --from=gnb-build /oai-ran/targets/bin/libcoding.so .
+COPY --from=gnb-build /oai-ran/targets/bin/libparams_libconfig.so .
+COPY --from=gnb-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
+COPY --from=gnb-build /oai-ran/cmake_targets/ran_build/build/libldpc.so .
+COPY --from=gnb-build /oai-ran/cmake_targets/ran_build/build/libldpc_optim.so .
+COPY --from=gnb-build /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so .
+COPY --from=gnb-build /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so .
+
+RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so"
+RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so"
+RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
+COPY --from=gnb-build /usr/local/lib/libprotobuf-c.so.1 .
+
+RUN ldconfig
+#debug
+#RUN ldd /opt/oai-gnb/bin/nr-softmodem.Rel15
+#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
+#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
+#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
+#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
+#RUN ldd /usr/local/lib/libcoding.so
+#RUN ldd /usr/local/lib/libparams_libconfig.so
+#RUN ldd /usr/local/lib/libdfts.so
+#RUN ldd /usr/local/lib/libldpc.so
+#RUN ldd /usr/local/lib/libldpc_optim.so
+#RUN ldd /usr/local/lib/libldpc_optim8seg.so
+#RUN ldd /usr/local/lib/libldpc_orig.so
+
+# Copy the relevant configuration files for gNB
+WORKDIR /opt/oai-gnb/etc
+COPY --from=gnb-build /oai-ran/ci-scripts/conf_files/gnb.* ./
+
+WORKDIR /opt/oai-gnb
+#EXPOSE 2152/udp  # S1U, GTP/UDP
+#EXPOSE 22100/tcp # ?
+#EXPOSE 36412/udp # S1C, SCTP/UDP
+#EXPOSE 36422/udp # X2C, SCTP/UDP
+#EXPOSE 50000/udp # IF5 / ORI (control)
+#EXPOSE 50001/udp # IF5 / ECPRI (data)
+
+#CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
+#ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
+
diff --git a/docker/Dockerfile.lteUE.ubuntu18 b/docker/Dockerfile.lteUE.ubuntu18
new file mode 100644
index 00000000000..34d2552fafc
--- /dev/null
+++ b/docker/Dockerfile.lteUE.ubuntu18
@@ -0,0 +1,121 @@
+#/*
+# * 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 BUILD service
+#   Valid for Ubuntu18.04
+#
+#---------------------------------------------------------------------
+
+FROM ran-build:latest AS lte-ue-build 
+
+WORKDIR /oai-ran
+
+#run build_oai to build the target image
+RUN /bin/sh oaienv && \ 
+    cd cmake_targets && \
+    mkdir -p log && \
+    ./build_oai --UE --ninja -w USRP
+
+# debug
+#RUN ldconfig -v
+#RUN ldd /oai-ran/targets/bin/lte-uesoftmodem.Rel15
+#RUN ls -lst /oai-ran/targets/bin
+#RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
+
+#start from scratch for target executable
+FROM ubuntu:bionic as oai-lte-ue
+ENV DEBIAN_FRONTEND=noninteractive
+ENV TZ=Europe
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+RUN apt-get update && \
+    DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
+    DEBIAN_FRONTEND=noninteractive apt-get install --yes \
+        software-properties-common \
+        libsctp1 \
+        libnettle6 \
+        liblapacke \
+        libatlas3-base \
+        libconfig9 \
+        openssl \
+        net-tools \
+        iproute2 \
+        libyaml-0-2 && \
+    # Install UHD driver from ettus ppa 
+    # At time of writing, it is 3.14
+    add-apt-repository ppa:ettusresearch/uhd --yes && \
+    apt-get update && \
+    DEBIAN_FRONTEND=noninteractive apt-get install --yes \
+        python \
+        libusb-1.0-0 \
+        libuhd003 \
+        uhd-host && \
+    rm -rf /var/lib/apt/lists/*
+
+WORKDIR /opt/oai-lte-ue/bin
+COPY --from=lte-ue-build /oai-ran/targets/bin/lte-uesoftmodem.Rel15 .
+COPY --from=lte-ue-build /oai-ran/targets/bin/conf2uedata .
+COPY --from=lte-ue-build /oai-ran/targets/bin/nvram .
+COPY --from=lte-ue-build /oai-ran/targets/bin/usim .
+COPY --from=lte-ue-build /oai-ran/targets/bin/.ue_emm.nvram0 .
+COPY --from=lte-ue-build /oai-ran/targets/bin/.ue.nvram0 .
+COPY --from=lte-ue-build /oai-ran/targets/bin/.usim.nvram0 .
+
+WORKDIR /usr/local/lib/
+COPY --from=lte-ue-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
+COPY --from=lte-ue-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
+COPY --from=lte-ue-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
+COPY --from=lte-ue-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
+COPY --from=lte-ue-build /oai-ran/targets/bin/libcoding.so .
+COPY --from=lte-ue-build /oai-ran/targets/bin/libparams_libconfig.so .
+COPY --from=lte-ue-build /oai-ran/cmake_targets/ran_build/build/libSIMU.so .
+COPY --from=lte-ue-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
+RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so"
+RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so"
+RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
+
+COPY --from=lte-ue-build /usr/local/lib/libprotobuf-c.so.1 .
+
+RUN ldconfig
+
+#debug
+#RUN ldd /opt/oai-lte-ue/bin/lte-uesoftmodem.Rel15
+#RUN ldd /opt/oai-lte-ue/bin/conf2uedata
+#RUN ldd /opt/oai-lte-ue/bin/nvram
+#RUN ldd /opt/oai-lte-ue/bin/usim
+#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
+#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
+#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
+#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
+#RUN ldd /usr/local/lib/libcoding.so
+#RUN ldd /usr/local/lib/libparams_libconfig.so
+#RUN ldd /usr/local/lib/libSIMU.so
+#RUN ldd /usr/local/lib/libdfts.so
+
+# Copy the relevant configuration files for eNB
+WORKDIR /opt/oai-lte-ue/etc
+COPY --from=lte-ue-build /oai-ran/ci-scripts/conf_files/ue.* ./
+
+WORKDIR /opt/oai-lte-ue
+#CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem", "-O", "/opt/oai-lte-ue/etc/enb.conf"]
+#ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"]
+
diff --git a/docker/Dockerfile.nrUE.ubuntu18 b/docker/Dockerfile.nrUE.ubuntu18
new file mode 100644
index 00000000000..32ffbb833bc
--- /dev/null
+++ b/docker/Dockerfile.nrUE.ubuntu18
@@ -0,0 +1,117 @@
+#/*
+# * 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 BUILD service
+#   Valid for Ubuntu 18.04
+#
+#---------------------------------------------------------------------
+
+FROM ran-build:latest AS nr-ue-build 
+
+WORKDIR /oai-ran
+
+#run build_oai to build the target image
+RUN /bin/sh oaienv && \ 
+    cd cmake_targets && \
+    mkdir -p log && \
+    ./build_oai --nrUE --ninja -w USRP
+
+# debug
+#RUN ldconfig -v
+#RUN ldd /oai-ran/targets/bin/nr-uesoftmodem.Rel15
+#RUN ls -lst /oai-ran/targets/bin
+#RUN ls -lst /oai-ran/cmake_targets/ran_build/build/*.so
+
+#start from scratch for target executable
+FROM ubuntu:bionic as oai-nr-ue
+ENV DEBIAN_FRONTEND=noninteractive
+ENV TZ=Europe
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+RUN apt-get update && \
+    DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
+    DEBIAN_FRONTEND=noninteractive apt-get install --yes \
+        software-properties-common \
+        libsctp1 \
+        libnettle6 \
+        liblapacke \
+        libatlas3-base \
+        libconfig9 \
+        openssl \
+        net-tools \
+        iproute2 \
+        libyaml-0-2 && \
+    # Install UHD driver from ettus ppa 
+    # At time of writing, it is 3.14
+    add-apt-repository ppa:ettusresearch/uhd --yes && \
+    apt-get update && \
+    DEBIAN_FRONTEND=noninteractive apt-get install --yes \
+        python \
+        libusb-1.0-0 \
+        libuhd003 \
+        uhd-host && \
+    rm -rf /var/lib/apt/lists/*
+
+WORKDIR /opt/oai-nr-ue/bin
+COPY --from=nr-ue-build /oai-ran/targets/bin/nr-uesoftmodem.Rel15 .
+
+WORKDIR /usr/local/lib/
+COPY --from=nr-ue-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
+COPY --from=nr-ue-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
+COPY --from=nr-ue-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
+COPY --from=nr-ue-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
+COPY --from=nr-ue-build /oai-ran/targets/bin/libcoding.so .
+COPY --from=nr-ue-build /oai-ran/targets/bin/libparams_libconfig.so .
+COPY --from=nr-ue-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
+COPY --from=nr-ue-build /oai-ran/cmake_targets/ran_build/build/libldpc.so .
+COPY --from=nr-ue-build /oai-ran/cmake_targets/ran_build/build/libldpc_optim.so .
+COPY --from=nr-ue-build /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so .
+COPY --from=nr-ue-build /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so .
+RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so"
+RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so"
+RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
+
+COPY --from=nr-ue-build /usr/local/lib/libprotobuf-c.so.1 .
+
+RUN ldconfig
+#debug
+#RUN ldd /opt/oai-nr-ue/bin/nr-uesoftmodem.Rel15
+#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
+#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
+#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
+#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
+#RUN ldd /usr/local/lib/libcoding.so
+#RUN ldd /usr/local/lib/libparams_libconfig.so
+#RUN ldd /usr/local/lib/libdfts.so
+#RUN ldd /usr/local/lib/libldpc.so
+#RUN ldd /usr/local/lib/libldpc_optim.so
+#RUN ldd /usr/local/lib/libldpc_optim8seg.so
+#RUN ldd /usr/local/lib/libldpc_orig.so
+
+# Copy the relevant configuration files for eNB
+WORKDIR /opt/oai-nr-ue/etc
+COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
+
+WORKDIR /opt/oai-nr-ue
+#CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/enb.conf"]
+#ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
+
diff --git a/docker/Dockerfile.ran.ubuntu18 b/docker/Dockerfile.ran.ubuntu18
new file mode 100644
index 00000000000..730366da74c
--- /dev/null
+++ b/docker/Dockerfile.ran.ubuntu18
@@ -0,0 +1,59 @@
+#/*
+# * 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 BUILD service
+#   Valid for Ubuntu 18.04
+#
+#---------------------------------------------------------------------
+
+
+FROM ubuntu:bionic AS ran-build
+ARG NEEDED_GIT_PROXY
+ENV DEBIAN_FRONTEND=noninteractive
+ENV TZ=Europe
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+#install developers pkg/repo
+RUN apt-get update && \
+    DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
+    DEBIAN_FRONTEND=noninteractive apt-get install --yes \
+       #gcc needed for build_oai
+       build-essential \
+       psmisc \
+       git \
+       xxd \
+       #unzip is needed for protobuf
+       unzip
+
+# In some network environments, GIT proxy is required
+RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
+
+#create the WORKDIR
+WORKDIR /oai-ran
+COPY . .
+
+#run build_oai -I to get the builder image
+RUN /bin/sh oaienv && \ 
+    cd cmake_targets && \
+    mkdir -p log && \
+    ./build_oai -I -w USRP
+
-- 
GitLab