goatcounter-systemd/Containerfile

19 lines
472 B
Text
Raw Permalink Normal View History

2024-09-28 16:20:24 -04:00
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" ]