Files
ols-ucentral-client/Dockerfile
Mike Hansen 176d2b9f36 [OLS-563] Add version to ols-ucentral-client
Dockerfile updated to pull tagged version of schema to get the schema.json file.
This will make subsequent versioning much easier.

Once this is merged we can tag the client as 3.2.7 and then move forward to 4.x as we did with the schema.

Signed-off-by: Mike Hansen <mike.hansen@netexperience.com>
2025-01-31 16:48:09 -05:00

76 lines
2.1 KiB
Docker

FROM debian:buster
LABEL Description="Ucentral client (Build) environment"
ARG HOME /root
ARG SCHEMA="3.2.7"
ARG SCHEMA_VERSION="v${SCHEMA}"
ARG SCHEMA_ZIP_FILE="${SCHEMA_VERSION}.zip"
ARG SCHEMA_UNZIPPED="ols-ucentral-schema-${SCHEMA}"
ARG OLS_SCHEMA_SRC="https://github.com/Telecominfraproject/ols-ucentral-schema/archive/refs/tags/${SCHEMA_ZIP_FILE}"
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 \
unzip
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/
ADD ${OLS_SCHEMA_SRC} /tmp/
# 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 unzip /tmp/${SCHEMA_ZIP_FILE} -d ${HOME}/ucentral-external-libs/
RUN cd ${HOME}/ucentral-external-libs/ && \
mv ${SCHEMA_UNZIPPED} ols-ucentral-schema