blob: 9fe6f98cace40e707a0e53b60e032ff19a13fecf [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:
Lott, Christopher (cl778h)c5c86792019-08-07 09:27:18 -040027# COPY --from=nexus3.o-ran-sc.org:10004/bldr-alpine3:1-a3.9 /usr/local/lib64/libnng.so.X.X.X /usr/local/lib
28# COPY --from=nexus3.o-ran-sc.org:10004/bldr-alpine3:1-a3.9 /usr/local/lib64/librmr_nng.so.X.X.X /usr/local/lib
Lott, Christopher (cl778h)d9056422019-08-02 10:50:39 -040029# COPY --from=nexus3.o-ran-sc.org:10004/bldr-alpine3:1-a3.9 /usr/local/lib/libmdclog.so.X.X.X /usr/local/lib
Lott, Christopher (cl778h)c5c86792019-08-07 09:27:18 -040030# Some packages install to /usr/local/lib, others to /usr/local/lib64
31# Alpine by default searches /usr/local/lib but not /usr/local/lib64
Lott, Christopher (cl778h)d9056422019-08-02 10:50:39 -040032
33FROM python:3.7-alpine
34RUN apk update && apk add \
35 autoconf \
36 automake \
37 build-base \
38 cmake \
39 libtool \
40 ninja \
41 pkgconfig \
42 python-dev \
Lott, Christopher (cl778h)4bc973c2020-03-17 09:15:03 -040043 sudo \
Lott, Christopher (cl778h)d9056422019-08-02 10:50:39 -040044 git \
45 go
46
47# the autoconf-archive in alpine's edge repos is too new
48# for our purposes, so we'll use one from the source.
49RUN cd /tmp \
50 && git clone --branch v2015.09.25 git://git.sv.gnu.org/autoconf-archive.git \
51 && cp /tmp/autoconf-archive/m4/* /usr/share/aclocal \
52 && rm -rf /tmp/autoconf-archive
53
E. Scott Daniels134c56f2019-09-25 15:20:50 -040054# NNG repo is not frequently tagged so it's pinned to a commit hash.
55# This commit provides fix to the proxy-reconnect
56# bug that we identified: https://github.com/nanomsg/nng/issues/970
Lott, Christopher (cl778h)d9056422019-08-02 10:50:39 -040057RUN cd /tmp \
E. Scott Daniels134c56f2019-09-25 15:20:50 -040058 && git clone https://github.com/nanomsg/nng.git \
Lott, Christopher (cl778h)d9056422019-08-02 10:50:39 -040059 && cd nng \
E. Scott Daniels134c56f2019-09-25 15:20:50 -040060 && git checkout e618abf8f3db2a94269a79c8901a51148d48fcc2 \
Lott, Christopher (cl778h)d9056422019-08-02 10:50:39 -040061 && mkdir build \
62 && cd build \
63 && cmake -DBUILD_SHARED_LIBS=1 -G Ninja .. \
64 && ninja \
65 && ninja install
66
67# MCDLOG, version is pinned
68RUN cd /tmp \
69 && git clone --branch v0.0.4 https://gerrit.o-ran-sc.org/r/com/log \
70 && cd log \
71 && ./autogen.sh \
72 && ./configure \
73 && make \
74 && make install
75
76# RMR, version is pinned
77RUN cd /tmp \
E. Scott Daniels09149a82019-08-16 10:28:06 -040078 && git clone --branch 1.3.0 https://gerrit.o-ran-sc.org/r/ric-plt/lib/rmr \
Lott, Christopher (cl778h)d9056422019-08-02 10:50:39 -040079 && cd rmr \
80 && mkdir build \
81 && cd build \
82 && cmake .. \
83 && make install