Alok Bhatt | d837a23 | 2020-11-13 22:54:17 +0000 | [diff] [blame] | 1 | # vi: ts=4 sw=4 noet:
|
| 2 |
|
| 3 | #==================================================================================
|
| 4 | # Copyright (c) 2020 AT&T Intellectual Property.
|
| 5 | # Copyright (c) 2020 Nokia
|
| 6 | #
|
| 7 | # Licensed under the Apache License, Version 2.0 (the "License");
|
| 8 | # you may not use this file except in compliance with the License.
|
| 9 | # You may obtain a copy of the License at
|
| 10 | #
|
| 11 | # http://www.apache.org/licenses/LICENSE-2.0
|
| 12 | #
|
| 13 | # Unless required by applicable law or agreed to in writing, software
|
| 14 | # distributed under the License is distributed on an "AS IS" BASIS,
|
| 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 16 | # See the License for the specific language governing permissions and
|
| 17 | # limitations under the License.
|
| 18 | #==================================================================================
|
| 19 |
|
| 20 | # Build the munchkin container assuming that the current working directory is the
|
| 21 | # top of the munchkin portion of the shared repo.
|
| 22 |
|
| 23 | # ---- these are global and must be set before the first from directive
|
| 24 | #
|
| 25 | # package versions and locations for easier maintenance
|
| 26 | ARG RMR_VER=4.1.4
|
| 27 | ARG LOG_VER=0.0.4
|
| 28 | ARG FRAME_VER=2.2.0
|
| 29 |
|
| 30 | ARG PROD_URL_BASE=https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/
|
| 31 | ARG BETA_URL_BASE=https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/
|
| 32 |
|
| 33 | ARG LOG_BASE=${PROD_URL_BASE}
|
| 34 | ARG RMR_BASE=${BETA_URL_BASE}
|
| 35 | ARG FRAME_BASE=${BETA_URL_BASE}
|
| 36 |
|
| 37 |
|
| 38 | # -----------------------------------------------------------------------------------------------------
|
| 39 | FROM ubuntu:18.04
|
| 40 |
|
| 41 | RUN apt-get update \
|
| 42 | && apt-get install -y git cmake make g++ wget curl libcurl4-gnutls-dev libcurlpp-dev libcurlpp0
|
| 43 |
|
| 44 |
|
| 45 | # sadly they need to be 'touched' to pull them into each stage
|
| 46 | ARG RMR_VER
|
| 47 | ARG LOG_VER
|
| 48 | ARG FRAME_VER
|
| 49 | ARG FRAME_BASE
|
| 50 | ARG RMR_BASE
|
| 51 | ARG LOG_BASE
|
| 52 |
|
| 53 | WORKDIR /playpen/down
|
| 54 |
|
| 55 | RUN wget --content-disposition ${LOG_BASE}/mdclog_${LOG_VER}-1_amd64.deb/download.deb \
|
| 56 | && wget --content-disposition ${LOG_BASE}/mdclog-dev_${LOG_VER}-1_amd64.deb/download.deb \
|
| 57 | && wget --content-disposition ${RMR_BASE}/rmr-dev_${RMR_VER}_amd64.deb/download.deb \
|
| 58 | && wget --content-disposition ${RMR_BASE}/rmr_${RMR_VER}_amd64.deb/download.deb \
|
| 59 | && wget --content-disposition ${FRAME_BASE}/ricxfcpp_${FRAME_VER}_amd64.deb/download.deb \
|
| 60 | && wget --content-disposition ${FRAME_BASE}/ricxfcpp-dev_${FRAME_VER}_amd64.deb/download.deb \
|
| 61 | && dpkg -i *deb
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 | WORKDIR /playpen/build
|
| 66 | COPY ./ ./
|
| 67 |
|
| 68 | # build the utility; installs into /usr/local/bin
|
| 69 | #
|
| 70 | RUN rm -fr .build \
|
| 71 | && mkdir .build \
|
| 72 | && cd .build \
|
| 73 | && cmake .. \
|
| 74 | && make install \
|
| 75 | && make test ARGS="-V"
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 | #RUN mkdir /var/mgxapp
|
| 80 | #COPY xapp_config.json /var/mgxapp/config.json
|
| 81 |
|
| 82 | #WORKDIR /playpen
|
| 83 | #CMD [ "munchkin", "-c", "/var/mgxapp/config.json" ] |