ntppool-exporter/Dockerfile

30 lines
483 B
Text
Raw Permalink Normal View History

2024-04-17 15:34:23 +02:00
FROM golang:1.22-alpine AS dev
COPY . /var/app
WORKDIR /var/app
ENV GO111MODULE="on" \
CGO_ENABLED=0 \
GOOS=linux
EXPOSE 80
ENTRYPOINT ["sh"]
FROM dev as build
RUN go mod download && go mod verify
2024-04-17 18:14:01 +02:00
RUN go build -o ntppool-exporter main.go$
2024-04-17 15:34:23 +02:00
RUN chmod +x ntppool-exporter
FROM scratch AS prod
WORKDIR /app
COPY --from=build /var/app/ntppool-exporter /bin/
LABEL maintainer="Adora Laura Kalb <adora@lila.network>"
EXPOSE 43609
ENTRYPOINT ["/bin/ntppool-exporter"]