[Add] prometheus

This commit is contained in:
2024-08-22 15:55:46 +08:00
parent b5d3b3005e
commit a1fa90dca5
2 changed files with 19 additions and 1 deletions

View File

@@ -5,4 +5,6 @@ services:
- 2379:2379
- 2380:2370
confd:
build: docker/confd
build: docker/confd
prometheus:
build: docker/prometheus

View File

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