init
Some checks failed
release-tag / release-image (push) Failing after 1m39s

This commit is contained in:
2026-04-23 21:56:44 +02:00
parent 329faadf8f
commit 2b08d518ad
14 changed files with 2823 additions and 0 deletions

32
Dockerfile Normal file
View File

@@ -0,0 +1,32 @@
FROM golang:1.24 AS builder
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -trimpath -ldflags="-s -w" -o /out/eventcollector .
FROM debian:trixie-slim
ENV LISTEN_ADDR=:8080
ENV TZ=Europe/Berlin
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates tzdata wget \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd --system --gid 10001 app \
&& useradd --system --uid 10001 --gid 10001 --no-create-home --home-dir /nonexistent --shell /usr/sbin/nologin app
WORKDIR /app
COPY --from=builder /out/eventcollector /app/eventcollector
USER 10001:10001
EXPOSE 8080
ENTRYPOINT ["/app/eventcollector"]