forked from stolostron/prometheus-alertmanager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.prow
31 lines (22 loc) · 1021 Bytes
/
Dockerfile.prow
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
# Copyright Contributors to the Open Cluster Management project
FROM registry.ci.openshift.org/stolostron/builder:go1.21-linux AS builder
WORKDIR /workspace
COPY . .
RUN go mod vendor
# adding the cgo flag here to not break the architecture CI builds
RUN go install github.com/prometheus/[email protected] && promu build -v --cgo --prefix ./
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
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
RUN microdnf update -y && microdnf clean all
RUN mkdir -p /alertmanager && \
chown -R nobody:nobody etc/alertmanager /alertmanager
COPY template /alertmanager/template/
USER nobody
EXPOSE 9093
VOLUME [ "/alertmanager" ]
WORKDIR /alertmanager
ENTRYPOINT [ "/bin/alertmanager" ]
CMD [ "--config.file=/etc/alertmanager/alertmanager.yml", \
"--storage.path=/alertmanager" ]