goatcounter-systemd/Containerfile
2024-09-28 16:20:24 -04:00

19 lines
No EOL
472 B
Docker

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" ]