netatmo-exporter/Dockerfile

24 lines
473 B
Docker
Raw Permalink Normal View History

2020-08-09 14:24:06 +00:00
FROM golang:1.14.7-alpine AS builder
2018-09-01 22:22:04 +00:00
2020-06-21 12:57:31 +00:00
RUN apk add --no-cache make git
2018-09-01 22:22:04 +00:00
2018-10-27 14:46:37 +00:00
WORKDIR /build
2018-09-01 22:22:04 +00:00
2018-10-27 14:46:37 +00:00
COPY go.mod go.sum /build/
RUN go mod download
RUN go mod verify
COPY . /build/
2020-06-21 12:57:31 +00:00
RUN make
2018-09-01 22:22:04 +00:00
FROM busybox
LABEL maintainer="Robert Jacob <xperimental@solidproject.de>"
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
2020-06-21 12:57:31 +00:00
COPY --from=builder /build/netatmo-exporter /bin/netatmo-exporter
2018-09-01 22:22:04 +00:00
USER nobody
EXPOSE 9210
ENTRYPOINT ["/bin/netatmo-exporter"]