blob: 387bef393b645f55eb7374663bf6891d0dad698d [file] [log] [blame]
Alok Bhattd837a232020-11-13 22:54:17 +00001# 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
26ARG RMR_VER=4.1.4
27ARG LOG_VER=0.0.4
28ARG FRAME_VER=2.2.0
29
30ARG PROD_URL_BASE=https://packagecloud.io/o-ran-sc/release/packages/debian/stretch/
31ARG BETA_URL_BASE=https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/
32
33ARG LOG_BASE=${PROD_URL_BASE}
34ARG RMR_BASE=${BETA_URL_BASE}
35ARG FRAME_BASE=${BETA_URL_BASE}
36
37
38# -----------------------------------------------------------------------------------------------------
39FROM ubuntu:18.04
40
41RUN 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
46ARG RMR_VER
47ARG LOG_VER
48ARG FRAME_VER
49ARG FRAME_BASE
50ARG RMR_BASE
51ARG LOG_BASE
52
53WORKDIR /playpen/down
54
55RUN 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
65WORKDIR /playpen/build
66COPY ./ ./
67
68# build the utility; installs into /usr/local/bin
69#
70RUN 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" ]