Add collectd Dockerfile
This commit is contained in:
36
collectd/docker/Dockerfile
Normal file
36
collectd/docker/Dockerfile
Normal file
@@ -0,0 +1,36 @@
|
||||
FROM debian:bookworm
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV TIMEZONE=Europe/Amsterdam
|
||||
|
||||
RUN apt update
|
||||
RUN apt dist-upgrade -y --no-install-recommends
|
||||
|
||||
RUN echo $TIMEZONE > /etc/timezone
|
||||
RUN dpkg-reconfigure -f noninteractive tzdata
|
||||
|
||||
RUN apt install -y libsensors5 liblzo2-2 collectd sudo btrfs-progs libatasmart4 speedtest-cli
|
||||
|
||||
RUN apt install -y smartmontools
|
||||
|
||||
RUN apt install -y wget git
|
||||
|
||||
ENV HDDTEMP_VERSION=0.3.1
|
||||
RUN wget https://github.com/slowpeek/hddtemp/archive/refs/tags/${HDDTEMP_VERSION}.tar.gz \
|
||||
&& tar xvf ${HDDTEMP_VERSION}.tar.gz && mv hddtemp-${HDDTEMP_VERSION}/hddtemp-lt /usr/sbin/hddtemp
|
||||
|
||||
RUN apt -y install make g++ python3 python3-dev python3-pybind11 cmake
|
||||
RUN git clone https://git.astron.nl:/RD/pmt
|
||||
RUN cmake -Spmt -Bpmt/build -DPMT_BUILD_RAPL=1 -DPMT_BUILD_BINARY=1 -DPMT_BUILD_PYTHON=1 -DCMAKE_INSTALL_PREFIX=/opt/pmt
|
||||
RUN make -Cpmt/build -j install
|
||||
ENV LD_LIBRARY_PATH="/opt/pmt/lib"
|
||||
ENV PYTHONPATH="/opt/pmt/lib/python3.11/site-packages"
|
||||
ENV PATH="$PATH:/opt/pmt/bin"
|
||||
RUN apt -y remove make g++ python3-dev python3-pybind11 cmake
|
||||
RUN apt autoremove -y
|
||||
|
||||
RUN useradd collectd
|
||||
RUN usermod -aG sudo collectd
|
||||
RUN echo 'collectd ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/collectd
|
||||
|
||||
CMD ["/usr/sbin/collectd", "-f"]
|
||||
Reference in New Issue
Block a user