FROM docker.io/golang:1.23 AS builder RUN apt-get update && apt-get install -y libsystemd-dev WORKDIR /goatcounter-systemd/ COPY ./ /goatcounter-systemd/ ENV GOCACHE="/go/pkg/mod" RUN --mount=type=cache,target="/go/pkg/mod" go build \ -o /usr/local/bin/goatcounter-systemd FROM docker.io/debian:stable-slim COPY --from=builder /usr/local/bin/goatcounter-systemd /usr/local/bin/goatcounter-systemd USER nobody ENTRYPOINT [ "/usr/local/bin/goatcounter-systemd" ]