-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (29 loc) · 916 Bytes
/
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
FROM debian:bullseye AS builder
LABEL maintainer="[email protected]"
RUN useradd -m metricq
RUN apt-get update && apt-get install -y \
cmake \
git \
libprotobuf-dev \
protobuf-compiler \
build-essential \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
USER metricq
COPY --chown=metricq:metricq . /home/metricq/metricq
WORKDIR /home/metricq/metricq
RUN mkdir build
WORKDIR /home/metricq/metricq/build
RUN cmake -DCMAKE_BUILD_TYPE=Release .. && make -j 2
RUN make package
FROM debian:bullseye
RUN apt-get update && apt-get install -y \
libssl1.1 \
libprotobuf23 \
tzdata \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m metricq
COPY --chown=metricq:metricq --from=builder /home/metricq/metricq/build/metricq-*-Linux.sh /home/metricq/metricq-Linux.sh
USER root
RUN /home/metricq/metricq-Linux.sh --skip-license --prefix=/usr
USER metricq