cups-exporter/Dockerfile

19 lines
346 B
Docker

FROM golang:1.19 as builder
WORKDIR /build
ADD . /build
RUN go build -o cups_exporter main.go
FROM golang:1.19
LABEL maintainer="lenny.consuegra@camptocamp.com"
ENV CUPS_URI "https://localhost:631"
COPY --from=builder /build/cups-exporter /bin/cups-exporter
EXPOSE 9329
CMD [ "/bin/sh", "-c", "/bin/cups_exporter -cups.uri ${CUPS_URI}" ]