[Add] node_exporter container

This commit is contained in:
2024-08-23 10:45:49 +08:00
parent 689ee78fad
commit 690aaba7c2
2 changed files with 18 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
FROM openeuler/openeuler:24.03
RUN dnf update -y && \
dnf clean all && \
rm -rf /var/cache/dnf/*
RUN curl -fsSL https://github.com/prometheus/node_exporter/releases/download/v1.8.2/node_exporter-1.8.2.linux-amd64.tar.gz | tar -xz -C /usr/local/bin && \
mv /usr/local/bin/node_exporter-*/node_exporter /usr/local/bin/node_exporter && \
rm /usr/local/bin/node_exporter-* -rf && \
chmod +x /usr/local/bin/node_exporter
RUN mkdir /etc/prometheus/ && \
touch /etc/prometheus/prometheus.yml
CMD ["node_exporter"]