-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathDockerfile.alertmanager
More file actions
45 lines (37 loc) · 1.93 KB
/
Dockerfile.alertmanager
File metadata and controls
45 lines (37 loc) · 1.93 KB
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
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.25 AS builder
WORKDIR /workspace
COPY alertmanager/ .
ENV GOFLAGS='-mod=mod -tags=netgo'
ENV CGO_ENABLED=0
ENV NO_DOCKER=true
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build $GOFLAGS -o alertmanager github.com/prometheus/alertmanager/cmd/alertmanager
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build $GOFLAGS -o amtool github.com/prometheus/alertmanager/cmd/amtool
FROM registry.redhat.io/ubi9/ubi-minimal:latest@sha256:c7d44146f826037f6873d99da479299b889473492d3c1ab8af86f08af04ec8a0
COPY --from=builder workspace/amtool /bin/amtool
COPY --from=builder workspace/alertmanager /bin/alertmanager
COPY --from=builder workspace/examples/ha/alertmanager.yml /etc/alertmanager/alertmanager.yml
COPY --from=builder workspace/LICENSE /licenses/.
RUN mkdir -p /alertmanager && \
chown -R nobody:nobody etc/alertmanager /alertmanager
USER nobody
EXPOSE 9093
VOLUME [ "/alertmanager" ]
WORKDIR /alertmanager
ENTRYPOINT [ "/bin/alertmanager" ]
CMD [ "--config.file=/etc/alertmanager/alertmanager.yml", \
"--storage.path=/alertmanager" ]
ARG VERSION=v0.31.1
LABEL com.redhat.component="coo-alertmanager" \
name="cluster-observability-operator/alertmanager-rhel9" \
cpe="cpe:/a:redhat:cluster_observability_operator:1.4::el9" \
version="${VERSION}" \
release="${VERSION}" \
vendor="Red Hat, Inc." \
distribution-scope="public" \
url="https://github.com/prometheus/alertmanager" \
summary="Alertmanager for Cluster Observability Operator" \
io.openshift.tags="openshift,monitoring" \
io.k8s.display-name="Alertmanager" \
io.k8s.description="Alertmanager handles alerts sent by client applications such as the Prometheus server" \
maintainer="OpenShift Monitoring team <team-monitoring-incluster@redhat.com>" \
description="Alertmanager for Cluster Observability Operator"