-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile.release
More file actions
43 lines (31 loc) · 982 Bytes
/
Dockerfile.release
File metadata and controls
43 lines (31 loc) · 982 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Release Dockerfile - uses pre-built binaries
# Expected build context structure:
# binaries/amd64/klag-exporter
# binaries/arm64/klag-exporter
FROM ubuntu:24.04
ARG TARGETARCH
# Install runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
libssl3t64 \
libsasl2-2 \
curl \
&& rm -rf /var/lib/apt/lists/*
# Create non-root user
RUN useradd -r -g root klag
WORKDIR /app
# Copy pre-built binary based on architecture
COPY binaries/${TARGETARCH}/klag-exporter /app/klag-exporter
RUN chmod +x /app/klag-exporter
# Copy example config
COPY config.example.toml /app/config.example.toml
# Set ownership
RUN chown -R klag:root /app
USER klag
# Expose Prometheus metrics port
EXPOSE 8000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
ENTRYPOINT ["/app/klag-exporter"]
CMD ["--config", "/app/config.toml"]