-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.build
51 lines (43 loc) · 2.44 KB
/
Dockerfile.build
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
ARG base_tag=latest
FROM ghcr.io/testillano/nghttp2:${base_tag}
MAINTAINER testillano
LABEL testillano.http2comm_builder.description="Docker image to build ert_http2comm library"
WORKDIR /code/build
ARG make_procs=4
ARG build_type=Release
ARG ert_logger_ver=v1.1.0
ARG ert_queuedispatcher_ver=v1.0.3
ARG jupp0r_prometheuscpp_ver=v0.13.0
ARG civetweb_civetweb_ver=v1.14
ARG ert_metrics_ver=v1.1.0
ARG base_os=ubuntu
RUN if [ "${base_os}" = "alpine" ] ; then apk update && apk add doxygen graphviz && rm -rf /var/cache/apk/* ; elif [ "${base_os}" = "ubuntu" ] ; then apt-get update && apt-get install -y doxygen graphviz && apt-get clean ; fi
# ert_logger
RUN set -x && \
wget https://github.com/testillano/logger/archive/${ert_logger_ver}.tar.gz && tar xvf ${ert_logger_ver}.tar.gz && cd logger-*/ && \
cmake -DERT_LOGGER_BuildExamples=OFF -DCMAKE_BUILD_TYPE=${build_type} . && make -j${make_procs} && make install && \
cd .. && rm -rf * && \
set +x
# ert_queuedispatcher
RUN set -x && \
wget https://github.com/testillano/queuedispatcher/archive/${ert_queuedispatcher_ver}.tar.gz && tar xvf ${ert_queuedispatcher_ver}.tar.gz && cd queuedispatcher-*/ && \
cmake -DERT_QUEUEDISPATCHER_BuildExamples=OFF -DCMAKE_BUILD_TYPE=${build_type} . && make -j${make_procs} && make install && \
cd .. && rm -rf * && \
set +x
# jupp0r prometheus-cpp
RUN if [ "${base_os}" = "alpine" ] ; then apk add zlib-dev curl-dev && rm -rf /var/cache/apk/* ; elif [ "${base_os}" = "ubuntu" ] ; then apt-get install -y zlib1g-dev libcurl4-openssl-dev && apt-get clean ; fi
RUN set -x && \
wget https://github.com/jupp0r/prometheus-cpp/archive/refs/tags/${jupp0r_prometheuscpp_ver}.tar.gz && \
tar xvf ${jupp0r_prometheuscpp_ver}.tar.gz && cd prometheus-cpp*/3rdparty && \
wget https://github.com/civetweb/civetweb/archive/refs/tags/${civetweb_civetweb_ver}.tar.gz && \
tar xvf ${civetweb_civetweb_ver}.tar.gz && mv civetweb-*/* civetweb && cd .. && \
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=${build_type} -DENABLE_TESTING=OFF .. && \
make -j${make_procs} && make install && \
cd ../.. && rm -rf * && \
set +x
# ert_metrics
RUN set -x && \
wget https://github.com/testillano/metrics/archive/${ert_metrics_ver}.tar.gz && tar xvf ${ert_metrics_ver}.tar.gz && cd metrics-*/ && \
cmake -DERT_METRICS_BuildExamples=OFF -DCMAKE_BUILD_TYPE=${build_type} . && make -j${make_procs} && make install && \
cd .. && rm -rf * && \
set +x