2019-10-11 19:38:21 +00:00
|
|
|
# Build /go/bin/ipmi_exporter
|
2019-10-18 09:42:15 +00:00
|
|
|
FROM quay.io/prometheus/golang-builder:1.13-base AS builder
|
2019-10-11 19:38:21 +00:00
|
|
|
|
2019-10-18 09:42:15 +00:00
|
|
|
RUN go get -d github.com/soundcloud/ipmi_exporter \
|
2019-10-11 19:38:21 +00:00
|
|
|
&& cd /go/src/github.com/soundcloud/ipmi_exporter \
|
2019-10-18 09:42:15 +00:00
|
|
|
&& make
|
2019-10-11 19:38:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Container image
|
|
|
|
FROM ubuntu:18.04
|
|
|
|
|
|
|
|
LABEL maintainer="Aggelos Kolaitis <neoaggelos@gmail.com>"
|
|
|
|
|
|
|
|
WORKDIR /
|
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install freeipmi-tools -y --no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2019-10-18 09:42:15 +00:00
|
|
|
COPY --from=builder /go/src/github.com/soundcloud/ipmi_exporter /bin/ipmi_exporter
|
2019-10-11 19:38:21 +00:00
|
|
|
|
|
|
|
EXPOSE 9290
|
|
|
|
|
2019-10-18 09:42:15 +00:00
|
|
|
CMD ["/bin/ipmi_exporter", "--config.file", "/config.yml"]
|