-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
69 lines (60 loc) · 1.94 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM debian:buster
LABEL Description="Ucentral client (Build) environment"
ARG HOME /root
ARG EXTERNAL_LIBS ${HOME}/ucentral-external-libs
ARG SCHEMA_COMMITID adeeb0457b7060d192e4180f96eca60d562d1d15
SHELL ["/bin/bash", "-c"]
RUN apt-get update -q -y && apt-get -q -y --no-install-recommends install \
build-essential \
g++ \
gcc \
cmake \
curl \
libcurl4-openssl-dev \
libev-dev \
libssl-dev \
libnl-route-3-dev \
libnl-3-dev \
apt-utils \
git \
wget \
autoconf \
libtool \
pkg-config \
libjsoncpp-dev
RUN git config --global http.sslverify false
RUN git clone https://github.com/DaveGamble/cJSON.git ${HOME}/ucentral-external-libs/cJSON/
RUN git clone https://libwebsockets.org/repo/libwebsockets ${HOME}/ucentral-external-libs/libwebsockets/
RUN git clone --recurse-submodules -b v1.50.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc ${HOME}/ucentral-external-libs/grpc/
RUN git clone --recursive --branch v7.1.4 https://github.com/zhaojh329/rtty.git ${HOME}/ucentral-external-libs/rtty/
RUN git clone https://github.com/Telecominfraproject/ols-ucentral-schema.git ${HOME}/ucentral-external-libs/ols-ucentral-schema/
# The following libs should be prebuilt in docker-build-env img to speed-up
# recompilation of only the ucentral-client itself
RUN cd ${HOME}/ucentral-external-libs/cJSON/ && \
mkdir build && \
cd build && \
cmake .. && \
make -j 4 && \
make install
RUN cd ${HOME}/ucentral-external-libs/libwebsockets/ && \
mkdir build && \
cd build && \
cmake .. && \
make -j 4 && \
make install
RUN cd ${HOME}/ucentral-external-libs/grpc/ && \
mkdir cbuild && \
cd cbuild && \
cmake -DgRPC_INSTALL=ON \
-DgRPC_BUILD_TESTS=OFF \
-DCMAKE_INSTALL_PREFIX=/usr/local \
.. && \
make -j4 && \
make install
RUN cd ${HOME}/ucentral-external-libs/rtty/ && \
mkdir build && \
cd build && \
cmake .. && \
make -j4
RUN cd ${HOME}/ucentral-external-libs/ols-ucentral-schema/ && \
git checkout ${SCHEMA_COMMITID}