smartctl_exporter/Dockerfile
Zoltan Langi 965204547a I've added support for NVMe drives and also created a docker file so a container can be built.
I've added the following metrics for the NVMe drives:
smart_status, critical_warning, available_spare, media_errors
2019-12-19 11:17:35 +01:00

18 lines
648 B
Docker

# Build /go/bin/smartctl_exporter
FROM quay.io/prometheus/golang-builder:1.13-base AS builder
ADD . /go/src/github.com/Sheridan/smartctl_exporter/
RUN cd /go/src/github.com/Sheridan/smartctl_exporter && make
# Container image
FROM ubuntu:18.04
WORKDIR /
RUN apt-get update \
&& apt-get install smartmontools/bionic-backports -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /go/src/github.com/Sheridan/smartctl_exporter/bin/smartctl_exporter /bin/smartctl_exporter
COPY docker-entrypoint.sh /
COPY smartctl_exporter.yaml /
RUN chmod +x /docker-entrypoint.sh
EXPOSE 9633
ENTRYPOINT ["/docker-entrypoint.sh"]