hue_exporter/Dockerfile.multistage
2022-10-18 23:51:18 +02:00

15 lines
No EOL
359 B
Docker

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
COPY hue_metrics.json ./
EXPOSE 9773
ENTRYPOINT [ "sh", "-c", "/hue_exporter -username ${USERNAME} -hue-url ${HUE_URL} -metrics-file hue_metrics.json" ]