File tree Expand file tree Collapse file tree 1 file changed +17
-12
lines changed Expand file tree Collapse file tree 1 file changed +17
-12
lines changed Original file line number Diff line number Diff line change 11# ---------- Build stage ----------
2- FROM debian:bookworm AS build
2+ FROM alpine:3.22.1 AS build
33ARG CMAKE_BUILD_TYPE=Release
44
5- RUN apt-get update && apt-get install -y --no-install-recommends \
6- build-essential cmake pkg-config git ca-certificates \
7- && rm -rf /var/lib/apt/lists/*
5+ # Install dependencies
6+ RUN apk add --no-cache \
7+ build-base \
8+ cmake \
9+ git \
10+ pkgconfig \
11+ ca-certificates
812
913WORKDIR /src
1014COPY heidpi-logger/ ./heidpi-logger/
@@ -19,21 +23,22 @@ RUN cmake -S heidpi-logger -B /build \
1923 && strip /build/heidpi_cpp || true
2024
2125# ---------- Runtime stage ----------
22- FROM debian:bookworm-slim AS runtime
26+ FROM alpine:3.22.1 AS runtime
2327
24- RUN apt-get update && apt-get install -y --no-install-recommends \
25- libstdc++6 ca-certificates \
26- && rm -rf /var/lib/apt/lists/*
28+ # Install runtime dependencies
29+ RUN apk add --no-cache \
30+ libstdc++ \
31+ ca-certificates
2732
28- # non-root
29- RUN useradd -r -u 10001 appuser
33+ # Create non-root user
34+ RUN adduser -D -u 10001 appuser
3035WORKDIR /app
3136
32- # Configs (aus Repo-Root)
37+ # Copy configuration and built binary
3338COPY config.yml /app/config.yml
34-
3539COPY --from=build /build/heidpi_cpp /usr/local/bin/app
3640
41+ # Environment variables
3742ENV WRITE="/var/log" \
3843 SHOW_FLOW_EVENTS=1 \
3944 SHOW_PACKET_EVENTS=1 \
You can’t perform that action at this time.
0 commit comments