-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
54 lines (43 loc) · 2.02 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
FROM ubuntu:22.04@sha256:0e5e4a57c2499249aafc3b40fcd541e9a456aab7296681a3994d631587203f97 as prometheus-cpp-builder
RUN apt update && export DEBIAN_FRONTEND=noninteractive && \
apt install -y curl git cmake build-essential file zlib1g-dev && rm -rf /var/lib/apt/lists/*
# renovate: datasource=github-tags depName=jupp0r/prometheus-cpp
ARG PROMETHEUS_CPP_VERSION=v1.3.0
RUN git clone https://github.com/jupp0r/prometheus-cpp -b ${PROMETHEUS_CPP_VERSION} /tmp/prometheus-cpp && \
cd /tmp/prometheus-cpp && \
git submodule init && \
git submodule update && \
mkdir build && \
cd build && \
cmake -DCPACK_GENERATOR=DEB -DBUILD_SHARED_LIBS=ON -DENABLE_PUSH=OFF -DENABLE_COMPRESSION=ON .. && \
cmake --build . --target package --parallel $(nproc) && \
mv prometheus-cpp_*.deb /prometheus-cpp.deb && \
cd - && \
rm -rf /tmp/prometheus-cpp
FROM ghcr.io/robotastic/trunk-recorder:edge@sha256:a104309dd07ffb2c6cfcf13da4fc634eb35278749b34a2a55d67f3507a581ab9
COPY --from=prometheus-cpp-builder /prometheus-cpp.deb /tmp/prometheus-cpp.deb
RUN apt update && export DEBIAN_FRONTEND=noninteractive && \
apt install -y /tmp/prometheus-cpp.deb && \
rm -rf /var/lib/apt/lists/*
WORKDIR /src/trunk-recorder-prometheus
COPY . .
WORKDIR /src/trunk-recorder-prometheus/build
RUN mv /etc/gnuradio/conf.d/gnuradio-runtime.conf /tmp/gnuradio-runtime.conf && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install --no-install-recommends --no-install-suggests -y \
git \
cmake \
make \
libssl-dev \
build-essential \
gnuradio-dev \
libuhd-dev \
libcurl4-openssl-dev \
libsndfile1-dev && \
cmake .. && make install && \
apt-get purge -y git cmake make libssl-dev build-essential gnuradio-dev libuhd-dev libcurl4-openssl-dev libsndfile1-dev && \
mv /tmp/gnuradio-runtime.conf /etc/gnuradio/conf.d/gnuradio-runtime.conf && \
rm -rf /var/lib/apt/lists/*
RUN rm -rf /src/trunk-recorder-prometheus
WORKDIR /app