Add NUT plugin
ContainerImages/collectd/pipeline/head There was a failure building this commit Details

The *collectd-nut* package pulls in *nut-client*, which in turn pulls in
Python (for PyNUT).  Since collectd only needs `libupsclient.so.6`, we
can extact it from the *nut-client* package and install it manually,
avoiding the dependency explosion.
main
Dustin 2024-01-17 10:51:35 -06:00
parent 4ac5581d3c
commit 2764541006
1 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,11 @@
FROM registry.fedoraproject.org/fedora:38 AS build
RUN --mount=type=cache,target=/var/cache \
dnf install -y \
--setopt=install_weak_deps=0 \
cpio \
&& :
RUN --mount=type=cache,target=/var/cache \
dnf install -y \
--downloadonly \
@ -8,6 +14,7 @@ RUN --mount=type=cache,target=/var/cache \
collectd \
collectd-chrony \
collectd-disk \
collectd-nut \
collectd-sensors \
collectd-write_prometheus \
&& :
@ -19,6 +26,9 @@ RUN --mount=type=cache,target=/var/cache \
/var/cache/rpms/libmicrohttpd-*.rpm \
/var/cache/rpms/libmnl-*.rpm \
/var/cache/rpms/protobuf-c-*.rpm \
&& cd /sysroot \
&& rpm2cpio /var/cache/rpms/nut-client-*.rpm \
| cpio -i './usr/lib*/libupsclient.so.6*' \
&& :