mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-11-16 01:33:07 +01:00
965204547a
I've added the following metrics for the NVMe drives: smart_status, critical_warning, available_spare, media_errors
18 lines
648 B
Docker
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"]
|