blob: f37bb27ec3c9f0e736a4b9483e3990777304e663 [file] [log] [blame]
Lott, Christopher (cl778h)d9056422019-08-02 10:50:39 -04001# O-RAN-SC
2#
3# Copyright (C) 2019 AT&T Intellectual Property and Nokia
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17# Builder image Alpine 3.9
18# gcc/g++ v 8
19# golang v 1.12
20# python 3.7
21# nng library (libnng.so, libnng.so.X.X.X; see below for pinned version)
22# Includes RIC libraries as a distribution path because
23# PackageCloud does not support Alpine .apk (yet):
24# mdc log library (libmdclog.so, libmdbclog.so.X.X.X; see below for pinned version)
25# rmr library (librmr_nng.so, libmdclog.so..X.X.X; see below for pinned version)
26# How to get a library file from this Docker base image:
27# COPY --from=nexus3.o-ran-sc.org:10004/bldr-alpine3:1-a3.9 /usr/local/lib64/libnng.so.X.X.X /usr/local/lib64
28# COPY --from=nexus3.o-ran-sc.org:10004/bldr-alpine3:1-a3.9 /usr/local/lib/libmdclog.so.X.X.X /usr/local/lib
29# COPY --from=nexus3.o-ran-sc.org:10004/bldr-alpine3:1-a3.9 /usr/local/lib/librmr_nng.so.X.X.X /usr/local/lib
30
31FROM python:3.7-alpine
32RUN apk update && apk add \
33 autoconf \
34 automake \
35 build-base \
36 cmake \
37 libtool \
38 ninja \
39 pkgconfig \
40 python-dev \
41 git \
42 go
43
44# the autoconf-archive in alpine's edge repos is too new
45# for our purposes, so we'll use one from the source.
46RUN cd /tmp \
47 && git clone --branch v2015.09.25 git://git.sv.gnu.org/autoconf-archive.git \
48 && cp /tmp/autoconf-archive/m4/* /usr/share/aclocal \
49 && rm -rf /tmp/autoconf-archive
50
51# NNG, version is pinned
52RUN cd /tmp \
53 && git clone --branch v1.1.1 https://github.com/nanomsg/nng.git \
54 && cd nng \
55 && mkdir build \
56 && cd build \
57 && cmake -DBUILD_SHARED_LIBS=1 -G Ninja .. \
58 && ninja \
59 && ninja install
60
61# MCDLOG, version is pinned
62RUN cd /tmp \
63 && git clone --branch v0.0.4 https://gerrit.o-ran-sc.org/r/com/log \
64 && cd log \
65 && ./autogen.sh \
66 && ./configure \
67 && make \
68 && make install
69
70# RMR, version is pinned
71RUN cd /tmp \
72 && git clone --branch 1.0.36 https://gerrit.o-ran-sc.org/r/ric-plt/lib/rmr \
73 && cd rmr \
74 && mkdir build \
75 && cd build \
76 && cmake .. \
77 && make install