mirror of
https://github.com/AnalogJ/scrutiny.git
synced 2026-04-21 14:57:53 -04:00
Co-authored-by: slydetector <slydetector> Co-authored-by: Aram Akhavan <1147328+kaysond@users.noreply.github.com>
21 lines
1.2 KiB
Docker
21 lines
1.2 KiB
Docker
########################################################################################################################
|
|
# Smartmontools Builder
|
|
# - Builds smartctl from source as a static binary.
|
|
# - Updates the drive database to include the latest drive models since it can change between releases.
|
|
# - Used as a shared build stage by Dockerfile and Dockerfile.collector.
|
|
########################################################################################################################
|
|
FROM debian:trixie-slim
|
|
ARG SMARTMONTOOLS_VER=7.5
|
|
RUN apt-get update && DEBIAN_FRONTEND=noninteractive \
|
|
apt-get install -y --no-install-recommends \
|
|
ca-certificates curl gcc g++ gnupg make \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
RUN curl -L "https://github.com/smartmontools/smartmontools/releases/download/RELEASE_$(echo ${SMARTMONTOOLS_VER} | tr '.' '_')/smartmontools-${SMARTMONTOOLS_VER}.tar.gz" -o /tmp/smartmontools.tar.gz \
|
|
&& tar -xzf /tmp/smartmontools.tar.gz -C /tmp \
|
|
&& cd /tmp/smartmontools-${SMARTMONTOOLS_VER} \
|
|
&& ./configure --prefix=/usr LDFLAGS='-static' --without-libcap-ng --without-libsystemd \
|
|
&& make -j"$(nproc)" \
|
|
&& make install \
|
|
&& /usr/sbin/update-smart-drivedb \
|
|
&& rm -rf /tmp/smartmontools*
|