mirror of
https://github.com/community-unscripted/telemetry-service.git
synced 2026-07-01 20:54:03 -04:00
19 lines
569 B
Docker
19 lines
569 B
Docker
FROM golang:1.26-alpine AS build
|
|
WORKDIR /src
|
|
COPY go.mod go.sum* ./
|
|
RUN go mod download 2>/dev/null || true
|
|
COPY . .
|
|
RUN go build -trimpath -ldflags "-s -w" -o /out/telemetry-service .
|
|
|
|
FROM alpine:3.23
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
WORKDIR /app
|
|
COPY --from=build /out/telemetry-service /app/telemetry-service
|
|
COPY entrypoint.sh /app/entrypoint.sh
|
|
RUN chmod +x /app/entrypoint.sh
|
|
|
|
EXPOSE 8080
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s \
|
|
CMD wget -q --spider http://localhost:8080/healthz || exit 1
|
|
ENTRYPOINT ["/app/entrypoint.sh"]
|