-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathDockerfile.prometheus
41 lines (34 loc) · 1.74 KB
/
Dockerfile.prometheus
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
FROM quay.io/maistra-dev/maistra-builder:2.4 AS builder
WORKDIR /go/src/github.com/prometheus/prometheus
COPY . .
RUN make common-build
FROM quay.io/centos/centos:stream8 as centos
ARG FROM_DIRECTORY=/go/src/github.com/prometheus/prometheus
LABEL com.redhat.component="openshift-istio-prometheus-ubi-container"
LABEL name="openshift-service-mesh/prometheus-rhel8"
LABEL version="2.4.0"
LABEL istio_version="1.16.0"
LABEL summary="Maistra Prometheus OpenShift container image"
LABEL description="Maistra Prometheus OpenShift container image"
LABEL io.k8s.display-name="Maistra Prometheus"
LABEL io.openshift.tags="istio"
LABEL io.openshift.expose-services="9090"
LABEL maintainer="Istio Feedback <[email protected]>"
ENV container="oci"
ENV ISTIO_VERSION="1.16.0"
RUN dnf update -y && dnf clean all
COPY --from=builder ${FROM_DIRECTORY}/prometheus /usr/local/bin/prometheus
COPY --from=builder ${FROM_DIRECTORY}/promtool /usr/local/bin/promtool
COPY --from=builder ${FROM_DIRECTORY}/documentation/examples/prometheus.yml /etc/prometheus/prometheus.yml
COPY --from=builder ${FROM_DIRECTORY}/console_libraries/ /usr/share/prometheus/console_libraries/
COPY --from=builder ${FROM_DIRECTORY}/consoles/ /usr/share/prometheus/consoles/
RUN mkdir -p /prometheus && \
chgrp -R 0 /prometheus && \
chmod -R g=u /prometheus
EXPOSE 9090
WORKDIR /prometheus
ENTRYPOINT [ "/usr/local/bin/prometheus" ]
CMD [ "--config.file=/etc/prometheus/prometheus.yml", \
"--storage.tsdb.path=/prometheus", \
"--web.console.libraries=/usr/share/prometheus/console_libraries", \
"--web.console.templates=/usr/share/prometheus/consoles" ]