2023-11-19 12:46:42 +00:00
|
|
|
FROM docker.io/debian:bookworm-slim
|
|
|
|
ARG VERSION=2.48.0
|
|
|
|
|
|
|
|
RUN apt-get update -y && apt-get upgrade -y && \
|
|
|
|
apt-get install -y --no-install-recommends curl ca-certificates
|
|
|
|
|
|
|
|
RUN addgroup --system --gid 10000 prometheus
|
|
|
|
RUN adduser --system --uid 10000 --ingroup prometheus --home /var/lib/prometheus prometheus
|
|
|
|
|
|
|
|
RUN curl --silent --show-error -L https://github.com/prometheus/prometheus/releases/download/v${VERSION}/prometheus-${VERSION}.linux-amd64.tar.gz | \
|
|
|
|
tar -C /opt --no-same-owner -xvzf - && \
|
|
|
|
mv /opt/prometheus-${VERSION}.linux-amd64 /opt/prometheus && \
|
|
|
|
mv /opt/prometheus/promtool /bin/promtool && \
|
|
|
|
mv /opt/prometheus/prometheus /bin/prometheus
|
|
|
|
|
|
|
|
ARG NODE_EXPORTER_VERSION=1.7.0
|
|
|
|
RUN curl --silent --show-error -L https://github.com/prometheus/node_exporter/releases/download/v${NODE_EXPORTER_VERSION}/node_exporter-${NODE_EXPORTER_VERSION}.linux-amd64.tar.gz | \
|
|
|
|
tar -C /tmp --no-same-owner -xvzf - node_exporter-${NODE_EXPORTER_VERSION}.linux-amd64/node_exporter && \
|
|
|
|
mv /tmp/node_exporter-${NODE_EXPORTER_VERSION}.linux-amd64/node_exporter /bin/node_exporter && \
|
|
|
|
rmdir /tmp/node_exporter-${NODE_EXPORTER_VERSION}.linux-amd64
|
|
|
|
|
2022-04-25 19:12:06 +00:00
|
|
|
COPY container/config /etc/prometheus
|
2023-11-19 12:46:42 +00:00
|
|
|
USER prometheus
|
|
|
|
|
|
|
|
ENTRYPOINT ["/bin/prometheus", "--config.file=/etc/prometheus/prometheus.yml", \
|
|
|
|
"--storage.tsdb.path=/var/lib/prometheus", \
|
|
|
|
"--web.console.templates=/opt/prometheus/consoles", \
|
|
|
|
"--web.console.libraries=/opt/prometheus/console_libraries"]
|