hue_exporter/Dockerfile

16 lines
442 B
Docker
Raw Permalink Normal View History

2022-10-18 21:29:35 +02:00
FROM golang:alpine AS build
WORKDIR /app
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY . .
RUN go build -o /hue_exporter
FROM alpine:latest
WORKDIR /
COPY --from=build /hue_exporter /hue_exporter
2022-10-18 23:51:18 +02:00
COPY hue_metrics.json ./
2022-10-18 21:29:35 +02:00
EXPOSE 9773
2023-10-17 21:28:30 +02:00
ENTRYPOINT [ "sh", "-c", "/hue_exporter -username ${USERNAME} -hue-url ${HUE_URL} -metrics-file hue_metrics.json -listen-address ${LISTEN_ADDRESS} -auth.user ${AUTH_USER} -auth.pass ${AUTH_PASS}" ]