Add smartmontools to container image (#51)

Switch to using Alpine container and install smartmontools so the
exporter can use the smartctl binary.

Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
Ben Kochie 2022-08-08 15:44:02 +02:00 committed by GitHub
parent 920c3429b1
commit b63f56e391
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1,8 +1,10 @@
ARG ARCH="amd64" ARG ARCH="amd64"
ARG OS="linux" ARG OS="linux"
FROM quay.io/prometheus/busybox-${OS}-${ARCH}:glibc FROM ${ARCH}/alpine:3
LABEL maintainer="The Prometheus Authors <prometheus-developers@googlegroups.com>" LABEL maintainer="The Prometheus Authors <prometheus-developers@googlegroups.com>"
RUN apk install smartmontools
ARG ARCH="amd64" ARG ARCH="amd64"
ARG OS="linux" ARG OS="linux"
COPY .build/${OS}-${ARCH}/smartctl_exporter /bin/smartctl_exporter COPY .build/${OS}-${ARCH}/smartctl_exporter /bin/smartctl_exporter