-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (18 loc) · 880 Bytes
/
Dockerfile
File metadata and controls
24 lines (18 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# ---------------------------------------------------------------------
# (1) build stage
# ---------------------------------------------------------------------
FROM observabilitystack/graalvm-maven-builder:21.0.1-ol9 AS builder
ADD . /build
WORKDIR /build
# Build application
RUN mvn -B native:compile -P native --no-transfer-progress -DskipTests=true && \
chmod +x /build/target/prometheus-alertecho
# ---------------------------------------------------------------------
# (2) run stage
# ---------------------------------------------------------------------
FROM debian:bookworm-slim
COPY --from=ghcr.io/tarampampam/curl:latest-alpine /bin/curl /bin/curl
COPY --from=builder "/build/target/prometheus-alertecho" /srv/prometheus-alertecho
HEALTHCHECK --interval=5s --timeout=1s CMD curl -f http://localhost:9095/health
EXPOSE 9095
CMD exec /srv/prometheus-alertecho