vlad shkapenyuk | 31d238a | 2019-10-29 10:45:09 -0400 | [diff] [blame] | 1 | # ------------------------------------------------------------------------------- |
| 2 | # Copyright (c) 2018-2019 AT&T Intellectual Property. |
| 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 | |
| 17 | ARG STAGE_DIR=/mc |
| 18 | |
E. Scott Daniels | 3d4b881 | 2021-02-01 11:51:19 -0500 | [diff] [blame] | 19 | FROM nexus3.o-ran-sc.org:10004/o-ran-sc/bldr-ubuntu18-c-go:1.9.0 AS project-build |
vlad shkapenyuk | 31d238a | 2019-10-29 10:45:09 -0400 | [diff] [blame] | 20 | |
| 21 | ARG STAGE_DIR |
| 22 | |
E. Scott Daniels | 3d4b881 | 2021-02-01 11:51:19 -0500 | [diff] [blame] | 23 | ARG RMR_VER=4.5.2 |
vlad shkapenyuk | 50db50e | 2020-04-15 19:07:44 -0400 | [diff] [blame] | 24 | |
vlad shkapenyuk | 167fe26 | 2020-05-19 11:10:52 -0400 | [diff] [blame] | 25 | RUN wget -nv --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr_${RMR_VER}_amd64.deb/download.deb |
| 26 | RUN wget -nv --content-disposition https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/rmr-dev_${RMR_VER}_amd64.deb/download.deb |
vlad shkapenyuk | 50db50e | 2020-04-15 19:07:44 -0400 | [diff] [blame] | 27 | RUN dpkg -i rmr_${RMR_VER}_amd64.deb |
| 28 | RUN dpkg -i rmr-dev_${RMR_VER}_amd64.deb |
| 29 | RUN ldconfig |
| 30 | |
vlad shkapenyuk | 31d238a | 2019-10-29 10:45:09 -0400 | [diff] [blame] | 31 | COPY mc ${STAGE_DIR} |
| 32 | WORKDIR ${STAGE_DIR} |
vlad shkapenyuk | 6d6450e | 2020-05-01 17:36:08 -0400 | [diff] [blame] | 33 | RUN apt-get update && \ |
| 34 | apt-get install -y libboost-all-dev && \ |
| 35 | apt-get install -y libhiredis-dev && \ |
| 36 | apt-get clean |
vlad shkapenyuk | 0eb834e | 2020-02-20 19:34:50 -0500 | [diff] [blame] | 37 | RUN git clone https://gerrit.o-ran-sc.org/r/ric-plt/sdl |
| 38 | WORKDIR ${STAGE_DIR}/sdl |
| 39 | RUN ./autogen.sh |
| 40 | RUN ./configure |
| 41 | RUN make all |
| 42 | RUN make install |
| 43 | WORKDIR ${STAGE_DIR} |
vlad shkapenyuk | 31d238a | 2019-10-29 10:45:09 -0400 | [diff] [blame] | 44 | RUN git clone https://github.com/protocolbuffers/protobuf.git |
| 45 | WORKDIR ${STAGE_DIR}/protobuf |
| 46 | RUN ./autogen.sh |
| 47 | RUN ./configure |
| 48 | RUN make clean |
| 49 | RUN make |
| 50 | RUN make install |
| 51 | RUN ldconfig |
| 52 | WORKDIR ${STAGE_DIR} |
| 53 | RUN git clone https://github.com/protobuf-c/protobuf-c.git |
| 54 | WORKDIR protobuf-c |
| 55 | RUN ./autogen.sh |
| 56 | ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig |
| 57 | RUN ./configure |
| 58 | RUN make |
| 59 | RUN make install |
| 60 | RUN ldconfig |
vlad shkapenyuk | 31d238a | 2019-10-29 10:45:09 -0400 | [diff] [blame] | 61 | WORKDIR ${STAGE_DIR} |
vlad shkapenyuk | 1634fd9 | 2020-05-29 12:35:05 -0400 | [diff] [blame] | 62 | RUN git clone -b release/0.3.0 https://gerrit.o-ran-sc.org/r/com/gs-lite |
vlad shkapenyuk | 31d238a | 2019-10-29 10:45:09 -0400 | [diff] [blame] | 63 | WORKDIR ${STAGE_DIR}/gs-lite |
vlad shkapenyuk | 6d6450e | 2020-05-01 17:36:08 -0400 | [diff] [blame] | 64 | COPY mc/cfg/packet_schema.txt ${STAGE_DIR}/gs-lite/cfg/ |
| 65 | COPY mc/cfg/ifres.xml ${STAGE_DIR}/gs-lite/cfg/ |
| 66 | COPY mc/cfg/localhost.ifq ${STAGE_DIR}/gs-lite/cfg/ |
vlad shkapenyuk | 31d238a | 2019-10-29 10:45:09 -0400 | [diff] [blame] | 67 | COPY mc/local_datasource ${STAGE_DIR}/gs-lite/src/lib/gscprts/local_datasource |
| 68 | COPY mc/local ${STAGE_DIR}/gs-lite/include/lfta/local |
| 69 | COPY mc/queries ${STAGE_DIR}/gs-lite/demo/queries |
vlad shkapenyuk | 0eb834e | 2020-02-20 19:34:50 -0500 | [diff] [blame] | 70 | COPY mc/mcnib/* ${STAGE_DIR}/gs-lite/src/tools/ |
vlad shkapenyuk | 31d238a | 2019-10-29 10:45:09 -0400 | [diff] [blame] | 71 | RUN ./build_and_install.sh |
| 72 | WORKDIR ${STAGE_DIR}/gs-lite/demo/queries |
| 73 | ENV GSLITE_ROOT ${STAGE_DIR}/gs-lite |
| 74 | RUN bash ${STAGE_DIR}/gs-lite/bin/buildit |
vlad shkapenyuk | 0eb834e | 2020-02-20 19:34:50 -0500 | [diff] [blame] | 75 | RUN python generate_runall.py |
vlad shkapenyuk | 31d238a | 2019-10-29 10:45:09 -0400 | [diff] [blame] | 76 | |
| 77 | |
| 78 | # now install the binaries and libraries into smaller docker image |
vlad shkapenyuk | 0d6fd96 | 2020-12-07 18:15:45 -0500 | [diff] [blame] | 79 | FROM nexus3.o-ran-sc.org:10002/o-ran-sc/ric-app-mc-listener:1.7.0 |
vlad shkapenyuk | 31d238a | 2019-10-29 10:45:09 -0400 | [diff] [blame] | 80 | |
E. Scott Daniels | 3d4b881 | 2021-02-01 11:51:19 -0500 | [diff] [blame] | 81 | # keep this close to the top to prevent lengthy rebuilds during testing |
| 82 | RUN apt-get update && \ |
| 83 | apt-get install -y curl python python-pip libboost-all-dev libhiredis-dev && \ |
| 84 | apt-get clean |
| 85 | |
vlad shkapenyuk | 31d238a | 2019-10-29 10:45:09 -0400 | [diff] [blame] | 86 | ARG STAGE_DIR |
| 87 | |
| 88 | COPY --from=project-build ${STAGE_DIR}/gs-lite/demo/queries /mc/gs-lite/demo/queries |
| 89 | COPY --from=project-build ${STAGE_DIR}/gs-lite/bin /mc/gs-lite/bin |
| 90 | COPY --from=project-build ${STAGE_DIR}/data_gen /mc/data_gen |
vlad shkapenyuk | 31d238a | 2019-10-29 10:45:09 -0400 | [diff] [blame] | 91 | COPY --from=project-build ${STAGE_DIR}/extract_params.py /mc/ |
vlad shkapenyuk | 50db50e | 2020-04-15 19:07:44 -0400 | [diff] [blame] | 92 | COPY --from=project-build ${STAGE_DIR}/extract_rmr_port.py /mc/ |
vlad shkapenyuk | 31d238a | 2019-10-29 10:45:09 -0400 | [diff] [blame] | 93 | COPY --from=project-build /usr/local/lib/libproto* /usr/local/lib/ |
vlad shkapenyuk | 0eb834e | 2020-02-20 19:34:50 -0500 | [diff] [blame] | 94 | COPY --from=project-build /usr/local/lib/libsdl* /usr/local/lib/ |
vlad shkapenyuk | 31d238a | 2019-10-29 10:45:09 -0400 | [diff] [blame] | 95 | |
vlad shkapenyuk | 9dbc426 | 2020-03-24 11:46:38 -0400 | [diff] [blame] | 96 | WORKDIR /opt/ric/config |
vlad shkapenyuk | 783f6bf | 2020-04-06 16:11:36 -0400 | [diff] [blame] | 97 | COPY --from=project-build ${STAGE_DIR}/mc_deployment.json /opt/ric/config/config-file.json |
vlad shkapenyuk | 9dbc426 | 2020-03-24 11:46:38 -0400 | [diff] [blame] | 98 | |
E. Scott Daniels | 7f09b7d | 2020-02-14 14:27:08 -0500 | [diff] [blame] | 99 | COPY container_start.sh /playpen/bin/ |
E. Scott Daniels | 3d4b881 | 2021-02-01 11:51:19 -0500 | [diff] [blame] | 100 | COPY package/*.py package/*.sh /playpen/bin/ |
vlad shkapenyuk | 31d238a | 2019-10-29 10:45:09 -0400 | [diff] [blame] | 101 | |
| 102 | RUN ldconfig |
| 103 | RUN pip install protobuf |
| 104 | |
vlad shkapenyuk | 783f6bf | 2020-04-06 16:11:36 -0400 | [diff] [blame] | 105 | ENV XAPP_DESCRIPTOR_PATH /opt/ric/config/ |
E. Scott Daniels | 7f09b7d | 2020-02-14 14:27:08 -0500 | [diff] [blame] | 106 | WORKDIR /playpen |
vlad shkapenyuk | 31d238a | 2019-10-29 10:45:09 -0400 | [diff] [blame] | 107 | ENV GSLITE_ROOT /mc/gs-lite |
E. Scott Daniels | 7f09b7d | 2020-02-14 14:27:08 -0500 | [diff] [blame] | 108 | |
| 109 | CMD ["/playpen/bin/container_start.sh"] |